403 Error after Initial Server Setup and Nginx Implementation

My website ‘’ 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

I followed this Medium guide for implementing Nginx :

More details can be provided, just let me know

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

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