<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>I know this Wiki page...</span></div><div><span>I guess return/rewrite are useless here: I only want to change the root and activate the directory listing when the user is on a specific directory of a specific domain.</span></div><div><br><span></span></div><div><span>Any more help ? :\</span></div><div><br><span></span></div><div><span>Thx,</span></div><div><span>B.R.</span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">De :</span></b> Maxim Dounin <mdounin@mdounin.ru><br> <b><span style="font-weight: bold;">À :</span></b> nginx@nginx.org <br> <b><span
 style="font-weight: bold;">Envoyé le :</span></b> Jeudi 26 janvier 2012 14h21<br> <b><span style="font-weight: bold;">Objet :</span></b> Re: autoindex directive in 'if' section<br> </font> </div> <br>Hello!<br><br>On Thu, Jan 26, 2012 at 02:16:22PM -0500, B.R. wrote:<br><br>> Hello,<br>> <br>> I would like to use the following in my conf file:<br>> location a/ {<br>>  if ($host ~* "") {<br>>   root "";<br>>   autoindex on;<br>>  }<br>> }<br>> <br>> But that doesn't work: 'nginx: [emerg] "autoindex" directive is not allowed<br>> here'<br>> <br>> What should I do?<br><br><a href="http://wiki.nginx.org/IfIsEvil" target="_blank">http://wiki.nginx.org/IfIsEvil</a><br><br>Maxim Dounin<br><br>_______________________________________________<br>nginx mailing list<br><a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a><br><a
 href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br><br><br> </div> </div>  </div></body></html>