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
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.

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