Possible bug? Redirect HTTP to HTTPS does not work for reverse-proxy subdomains

Discussion in 'General' started by Kashinoda, Aug 5, 2021.

  1. Kashinoda

    Kashinoda New Member

    Not sure if this is a bug or intended.
    When the Redirect HTTP to HTTPS option is ticked the following lines for non-proxy subdomains are added to the domain.com.vhost file in the main server block:
    Code:
            if ($http_host = "sub.domain.com") {
                rewrite ^(?!/(sub|stats|error|\.well-known/acme-challenge))/(.*)$ /sub/$2 last;
            }
    However no lines are added for any subdomains setup as proxy, this can easily be fixed manually - I've simply added the following code to the server block for the reverse-proxy in question:
    Code:
        if ($scheme = http) {
            return 301 https://$server_name$request_uri;
    }
    Not a huge deal, the issue is whenever ISPConfig makes changes to the domain.com.vhost file the manual changes are lost.
     
  2. Kashinoda

    Kashinoda New Member

    Bump
    This is still present in 3.2.9
     
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    We don't modify vhost file manually when using ISPConfig, we add the directives in option tab.
     

Share This Page