Problem 403 in rails app with nginx.

May 23, 2014 4.3k views
Hello guys. I configured my Nginx to run passenger with Nginx module. My PHP applications work normally. In my nginx.conf file I put the following: server {        listen 80;        server_name;        root /var/ www/;        passenger_enabled on; } In the public folder I ran "chmod-R 755 public" and then immediately "chown www-data: www-data public." 'm Having 403 error. "403 Forbidden nginx/1.6.0" In my error.log I can see this. 2014/05/23 13:04:16 [error] 23505#0: *295 directory index of "/var/www/" is forbidden, client: , server:, request: "GET / HTTP/1.1", host: "" What am I doing wrong? My regards. Renato
3 Answers
Try this, its different from the one you used.
chown -R www-data:www-data public
Thanks for your answer. I tried this, but doesn't work too.

Help me!!
I solved the problem. The problem was the wrong address to passenger_root.

I fixed and worked! xD
Have another answer? Share your knowledge.