autoindex directive in 'if' section

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


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

What should I do?

*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list