Question

403 forbidden

  • Posted on February 20, 2013
  • rico77Asked by rico77

Hi, I have nginx and a wordpress website running on my vps. During development I used deny all and only allow my ip in the nginx vhost. Which worked fine, I could dev the website and the rest of the world would get a 403 forbidden.

Now I tried to make my website public (by removing the deny all line). But visitors still get to see the 403 error. Yet I can still see the website just fine. As far as I can see the file permissions are all set as it should, recursively from /var/www/ with 755 on folders and 644 on files. The owner and group is set as www-data. Ofcourse I reloaded nginx.

Am I missing something? Any help is much appreciated!

Cheers, Richard


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.

Thanks for your reply. I resolved the issue. Turns out in another vhost on the same server I accidentally placed the allow/deny access restrictions outside of the server block instead of inside. So it restricted globally on both vhosts.

If you are seeing the website but other visitors are getting a 403 then it isn’t a permissions problem otherwise everyone would be seeing that. <br> <br>You may want to doublecheck that your domain does resolve to the IP of your virtual server just to ensure that you are indeed visiting the running site on the droplet. <br> <br>If that is the case and since you did mention that you already had a config that restricted access why not remove it entirely because from the original message it wasn’t clear if you attempted to modify it to let people through or just removed it entirely.

  1. The dir structure for my websites is /var/www/mydomain.tld/public. Owned by user and group: www-data. Could that cause issues? <br>2. In my nginx.conf file the user is www-data. Is that what you mean?