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

Re: Nginx vhost config issue

$
0
0
Why should it redirect to https when you open http://www.domain.com/admin ? I don't see any "location /admin" block that would do that.

If you want https only for /admin create a block like this:

location /admin {
return 301 https://www.domain.com/admin;
}

Better: If you have the ressources, why not redirect all traffic to https?

server {
listen 80;
server_name www.domain.com domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name www.domain.com domain.com;

[rest of your config]

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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