autoindex directive in 'if' section

B.R. reallfqq-nginx at yahoo.fr
Thu Jan 26 19:16:22 UTC 2012


Hello,

I would like to use the following in my conf file:
location a/ {
 if ($host ~* "") {
  root "";
  autoindex on;
 }
}

But that doesn't work: 'nginx: [emerg] "autoindex" directive is not allowed
here'

What should I do?

Thanks,
---
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120126/566733ec/attachment.html>


More information about the nginx mailing list