I set up nginx on Ubuntu 12.04 and when remotely accessing a file other than the index.htm/php/html, the server says that access is forbidden. I tried to search for a solution but no luck. Any ideas/hints/solutions???
403 errors in nginx get thrown when ownership of other files isnt compatible with the user that
nginx runs as. Use
ls -l on the web root folder to find ownership of the files. Make sure that the group part is www-data. If its in any user-level folders (such as your home directory), make sure that www-data can read the file directory structure to there.
Without more details, though, I can't explain how to fix this any better... attaching details about the file structure, where on the drive your files are sitting, etc. may help.
(Source: Me, as I'm on the nginx team)