using autoindex and the php index file
Piotr Karbowski
jabberuser at gmail.com
Wed Oct 12 20:55:54 UTC 2011
On 12.10.2011 22:22, bimbonius wrote:
> 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 ?
Propably because you set up 'index index.php;' in location / and not in
/autoindex_dir/not/. Move it outside location /, like just into http {}
Read http://wiki.nginx.org/HttpCoreModule#location
-- Piotr.
More information about the nginx
mailing list