Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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???

share|improve this question
Have you checked the permissions of the files/directories? ls -l will list all the files and their permissions. If the permissions of index.* are the same as the other files then something else is wrong. Let us know if this is the case – cosmorogers Jun 17 '12 at 18:53

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)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.