Non-www URL not redirecting when accessed by http. Works with https. (v4.0.14)


#1

I believe this is a new issue.

I have a site. Let’s call it www.example.com.

If I enter into a browser example.com, the browser returns https://www.example.com with no issue.

If I enter into a browser www.example.com, the browser returns https://www.example.com with no issue.

Similarly, if I manually type https:// before the above two URLs, the browser returns https://www.example.com with no issue.

If I enter into a browser http://www.example.com, the browser returns https://www.example.com with no issue.

All of that is exactly as expected. But here’s the problem: If I enter into a browser http://example.com, the browser returns a 503 Service Temporarily Unavailable error from the nginx proxy.

This is happening to all sites on the server that were created with www in the URL.

Is anyone else experiencing this, and what version are you on? I have a suspicion this was introduced with a recent version.


#2

@mrrobot47 - any ideas?


#3

type this
nano /var/lib/docker/volumes/global-nginx-proxy_confd/_data


#4

and create a notepad name something like this

easyengine.io-redirect.conf

and put on that Directory

like this

Screenshot_4

then restart to make it changes

ee site restart easyengine.io --nginx

just change easyengine io with your site url please thanks if you understand
i dont know anything but i can help with my experience as a newbie


#5

Hi @jounin21,

Thanks for the feedback.

Yes, I can (have) temporarily put in a custom config file in the global nginx-proxy service to fix this, however the bigger issue here is that this problem first appears when I did the last update (from 4.0.11 - or maybe it was 12, to 4.0.14), and a temporary custom config shouldn’t be required.

and as a side note, in your above reply, (1) the ‘listen 443’ block would be unnecessary because only the port 80 traffic is misbehaving, and (2) for this to work, the global nginx-proxy server needs to be reloaded/restarted - not the site specific nginx service ( ee service restart nginx-proxy ).

Thanks,

David.


#6

try this Code if you Have Something Red or Problem with Custom Config or Nginx
docker logs --tail=10 -f services_global-nginx-proxy_1