using autoindex and the php index file

bimbonius nginx-forum at nginx.us
Wed Oct 12 20:22:53 UTC 2011


Hi.

My config looks like this:




location / {
   ...
   index index.php;
   autoindex off;
}

...

location /autoindx_dir/ {
   autoindex on;
}

location /autoindx_dir/not/ {
   autoindex off;
}


also I have the php cgi options.
The problem is that nginx opens the index.php for my root directory if i
open only the domain. If I go to the "autoindx_dir" directory I see the
directory files like i want. But if I open "autoindex_dir/not" I see
also the hole directory although i have a index.php.

Whats wrong ?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,216607,216607#msg-216607



More information about the nginx mailing list