Problem
Despite checking permissions, nginx will return nothing but a 403 error page.
Solution
Added this line
2
|
user myusername staff;
|
Background
I installed nginx on my mac like everyone else using this guide, and it worked for my site until I changed the configuration to a different directory a second time. Something was different.
I started to get 403 errors, so I checked the logs and didn’t find anything more helpful than this.
1
2
3
|
2014/04/19 15:56:36 [error] 1825#0: *1 "/usr/local/var/www/codename/index.html" is forbidden (13: Permission denied), client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost:8080"
|
After about 2 hours burned changing permissions on everything imaginable I found this guy, who figured out /usr/local/etc/nginx/nginx.conf
, needs the user line to read
2
|
user myusername staff;
|
It was that simple!