Welcome! Log In Create A New Profile

Advanced

Re: using autoindex and the php index file

Piotr Karbowski
October 12, 2011 04:58PM
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.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

using autoindex and the php index file

bimbonius October 12, 2011 04:22PM

Re: using autoindex and the php index file

Piotr Karbowski October 12, 2011 04:58PM

Re: using autoindex and the php index file

bimbonius October 12, 2011 05:25PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 277
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready