Wordpress website shows: 403 Forbidden on Ubuntu Nginx

Hello I have a WordPress website running under Ubuntu 18 and Nginx and I get the following error “403 Forbidden”

When I check the error log I can see these problems pretty much every single time “106 directory index of “/var/www/html/” is forbidden”

How can I solve this problem?


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.

Hi @boriszegarac,

Firstly, make sure in your Nginx configuration file for your domain, you have the proper DocumentRoot. If you are uncertain on how it should look, I’ll recommend either posting it here or checking out the following article :

The second thing I would ask you to make sure is, given your DocumentRoot, that your website is actually in that directory. If there is no index page, a 403 error like you are experiencing will be shown.

Next thing you might want to check if your ownership and permissions. Usually, the permissions should be 644 for files and 755 for folders. As for the ownership, it should be your Nginx user that you have specified.

Do the above things and see if they work. If they don’t please post a part of your error_log relevant to the issue experienced.

Regards, KFSys