Nginx – 403 Forbidden in Nginx Server

nginx

I'm using nginx for the first time. I have an index.html file in my /home/deploy/sites/hello directory. I made sure the folder and index.html is owned by the user deploy and that the file permission is 777.

I then added this entry to /etc/nginx/conf.d/00-app.conf

server {
    listen 80;
    root /home/deploy/sites/hello;
    index index.html;
    server_name hello.com;
    error_log               /var/log/nginx/tbs_error.log;
}

Then I did a sudo service nginx restart. When I go to hello.com, I get a 403 forbidden error. Anyone know how I might be able fix this issue? All the other nginx sites on this server are still functioning.

Best Answer

As per DerfK, I noticed the sites directory did not have executable permission for others. So i did chmod 757 on the sites directory and things worked

Related Topic