By boriszegarac
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?
Thanks
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.