Server Fault is a question and answer site for system and network administrators. 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 would like to configure nginx to list and serve bulk files from a select directory (autoindex on option). However I worry that if a symbolic link will be accidentally placed in such a directory, all files in the filesystem may become externally exposed (for example by a symbolic link to /).

Is there a way to avoid this?

share|improve this question
up vote 2 down vote accepted

Use the disable_symlinks directive:

disable_symlinks on
share|improve this answer
note that this parameter is only available from 1.1.16. – edogawaconan Oct 26 '12 at 16:13

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.