Report this

What is the reason for this report?

403 forbidden

Posted on February 20, 2013

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



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!

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.

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.

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.

  1. Is nginx htdocs root set to /var/www, normally its /usr/share/nginx/… <br>2. Is nginx running as www-data?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.