When visit: www.fxmates.com/ => return 404
visit: https://fxmates.com/ => OK
Here's my Nginx config file:
What's wrong?
There are multiple errors in your code actually:
Make it:
server_name fxmates.com www.fxmates.com;
Also, remove this line:
It's what causes your nginx webserver to give the user a 404 page each and everytime the user goes to any page on
fxmates.com
on http://fxmates.com
, since in any browser when you type fxmates.com
only without https://
the browser defaults to http://
and then the return 404
block pushes 404
to the user's browser.
And the reason this doesn't effect you when you're directly typing https://
in front because, nginx
uses the above server block
in the configuration file.
Hope it helps.