By ajhorvath36
My website ‘alexanderhorvath.com’ is displaying a ‘403 Forbidden’ error when searching its address.
I think the problem is with the configuration file (located in root/var/ww)
Or, my private key is inaccessible to to the public
I followed the Digital Ocean guides on initial server setup, haphazardly so, until I found my domain located on check-host.net
I followed this Medium guide for implementing Nginx : https://medium.com/@jgefroh/a-guide-to-using-nginx-for-static-websites-d96a9d034940
More details can be provided, just let me know
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 @ajhorvath36,
It seems like your Nginx configuration file is not serving the proper files or it’s not seeing the document root folder. DigitalOcean has a pretty good tutorial on that matter here - https://www.digitalocean.com/community/tutorials/understanding-the-nginx-configuration-file-structure-and-configuration-contexts
Having said that, here are a few suggestions you might check
Index Files
One of the most common causes of the “403 Forbidden” error is not having a correctly set up index file.
The NGINX configuration file specifies which index files to load, and in which order. For example, this line tells NGINX to look for index.html, then index.htm, then index.php:
index index.html index.htm index.php;mixed
If none of those three files are found in the directory, NGINX returns a “403 Forbidden” error.
File Permissions
Incorrect file permissions are another cause of the “403 Forbidden” error. The standard setting of 755 for directories and 644 for files is recommended for use with NGINX. The NGINX user also needs to be the owner of the files.
Additionally, if you are unable to resolve it, please pass your Nginx Configuration and I’ll be able to further help you out.
Regards, KDSys
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.