0

I have a webmin installation that is proxied by an nginx server.

My nginx config looks like:

server {
    listen 80; 
    server_name mysite;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    include snippets/ssl.conf;

    ## Your website name goes here.
    server_name mysite;
    location / { 
        proxy_pass      http://127.0.0.1:10000/;
        proxy_redirect  http://127.0.0.1:10000/ https://mysite/;
        proxy_set_header        Host            $host;
    }  
}

Everything works except for some parts of webmin where I get a:

Mixed Content: The page at 'https://mysite/' was loaded over HTTPS, but requested an insecure form action 'http://mysite/useradmin/index.cgi?mode=users'. This request has been blocked; the content must be served over HTTPS.

I have also tried to set the Redirect non-SSL requests to SSL mode? to yes but without success.

Fabrizio Mazzoni
  • 671
  • 1
  • 9
  • 24

1 Answers1

0

It might be a cache problem. Try a private/incognito window or a different browser and see if the problem persists.

If it does you can try adding these headers to your location block:

proxy_set_header        X-Forwarded-Ssl         on;
proxy_set_header        X-Forwarded-Proto       https;