Redirection non-www to www problem

Does that mean you removed the server block with the regex for server_name?

Because there are much simpler ways to do that. And, it wasn't doing all you wanted anyway.

We are still seeing infinite redirects for http.

Are you restarting nginx after each change? Have you tried just re-booting your server? In unusual cases you can get two nginx systems running that can't be controlled with normal systemctl commands. When wierd stuff like this happens it is worth trying that.

We can look into details to assess that if it is not practical to reboot. Let us know.

5 Likes