Nginx config for enabled sites does not appear to be taking effect any more

I’m trying to get my server setup to handle multiple wordpress sites on nginx.

I followed the different tutorials in the initial server setup, lemp installation etc.

Everything was working ok with the exception of permalinks not working at all. I couldn’t navigate to any page on the front end (away from the domain root).

So since then I have tried a lot of different things messing with nginx.conf and other files (from instructions in the wp codex), but none of that helped, so since then I’ve tried to go back to a clean slate with nginx and php-fpm.

I uninstalled them both, purged, autocleaned, and reinstalled them.

After this, I’ve gone through the basics again and nginx is running, but something is still very wrong. When I go to my server IP, I get the “It works!” index.html from /var/www/ but my configuration should be pointing it to a different document root.

my nginx.conf looks like this:

my only file in sites-enabled looks like this:

From what I understand, it should be picking up my site’s configuration in sites-enabled rather than loading this file.

I’m stumped, please help.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I know I am late to the party, but for those who find this through google: Try launching the url from a different browser before making those changes listed above ;)

Explanation: If you set a bogus redirect rule in a file with a permanent switch, most browsers will remember this rule and cache it. For example chrome caches it in some internal file that can not be cleared by removing cookies and site data - you have to actually clear full browser history and all browsing data for the last x hours.

I hope this doesn’t bump this old thread but THANK YOU. I’ve done this quite a few times and could not figure out why it wasn’t working. I thought my version of Nginx had gone mad. Nope, I just forgot how to symlink…

Sweet! Glad to hear it’s working now :]