Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Redirect with HTTPS with basic auth

$
0
0
You could try something like:

server {
listen 80;
listen 443 ssl;
server_name mydomain.com;
if ($scheme = 'http') { rewrite ^ https://$http_host$request_uri? permanent; }
location / { bla.....; }
}

ea. keep the 'if' outside the location blocks.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>