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:
            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:
        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.

Share This Page