Валентин Бартенев
December 12, 2011 03:38AM
On Monday 12 December 2011 09:56:05 redline wrote:
> Нужно для конкретной директории задать
> "autoindex on".
> Если указать точный location с "autoindex on", то
> при обращении к нему выдается 403
> Пример конфигурации:
> =====
> #user nobody;
> worker_processes 1;
> events {
> worker_connections 1024;
> }
> http {
> server {
> listen 80;
> server_name localhost;
> charset utf-8; #без этого autoindex не работает
> совсем
> root ../root;
> index index.html
> location = /img {
> autoindex on;
> }
> }
> }

location = /img {
autoindex on;
}

Обращение к директории, т. е. к /img/ сюда очевидно не попадет.

> "location ~* ^\/img$" не работает.

И сюда тоже.

> Существует ли решение или это баг?

location = /img/ {
autoindex on;
}

--
Валентин Бартенев
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

autoindex для "=" location

redline December 12, 2011 12:56AM

Re: autoindex для "=" location

Валентин Бартенев December 12, 2011 03:38AM

Re: autoindex для "=" location

redline December 12, 2011 04:01AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 313
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