View Single Post
Old 07-27-2020, 07:01 PM   #1
Junior Member
Join Date: Mar 2020
Posts: 4 is on a distinguished road
Default www-domains > Edit breaks Nginx config

My Nginx config is set to redirect non www and also non https to

This means I have 3 server blocks:

server_name; for port 80 There is no https so
return 301$request_uri; send to https://www

server_name; for port 443 ssl There is no www so
return 301$request_uri; send to https://www

Now we are where we should be so:

server_name; This is correct.

If I make any change by editing the www-domain for instance enabling gzip or altering the cache then all 3 server blocks have their name changed like:


This causes an infinite redirect loop.

Why are the server blocks re-written each time? just to add entries. is offline   Reply With Quote