anilapu
By:
anilapu

403 forbidden error when insatlling rails+nginx+passenger

February 20, 2014 5.6k views
root@navaratanhosts:/opt/nginx/logs# tail -f /var/log/nginx/error.log 2014/02/20 08:05:52 [error] 19961#0: *5 directory index of "/home/uvarsity/" is forbidden, client: 122.169.168.13, server: localhost, request: "GET / HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:05:52 [error] 19961#0: *5 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 122.169.168.13, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:05:53 [error] 19961#0: *6 directory index of "/home/uvarsity/" is forbidden, client: 122.169.168.13, server: localhost, request: "GET / HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:05:53 [error] 19961#0: *6 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 122.169.168.13, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:05:53 [error] 19961#0: *7 directory index of "/home/uvarsity/" is forbidden, client: 122.169.168.13, server: localhost, request: "GET / HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:05:53 [error] 19961#0: *7 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 122.169.168.13, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:05:53 [error] 19961#0: *8 directory index of "/home/uvarsity/" is forbidden, client: 122.169.168.13, server: localhost, request: "GET / HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:05:53 [error] 19961#0: *8 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 122.169.168.13, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:05:53 [error] 19961#0: *9 directory index of "/home/uvarsity/" is forbidden, client: 122.169.168.13, server: localhost, request: "GET / HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:05:53 [error] 19961#0: *9 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 122.169.168.13, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "128.199.233.97" 2014/02/20 08:08:16 [error] 19961#0: *10 directory index of "/home/uvarsity/" is forbidden, client: 150.214.164.140, server: localhost, request: "HEAD / HTTP/1.0" How to overcome this problem
2 Answers
make sure your give your home folder chomd 755 permission.

it is better to create a custom root folder for your site and give the main folder chomd 755

2014/02/20 08:08:16 [error] 19961#0: *10 directory index of "/home/uvarsity/" is forbidden, client: 150.214.164.140, server: localhost, request: "HEAD / HTTP/1.0"
nginx is trying to serve /home/uvarsity but there aren't any index files so it's returning a 403 error.

Can you pastebin your nginx config?
Have another answer? Share your knowledge.