Welcome! Log In Create A New Profile

Advanced

Re: ..directory index is forbiden..

February 28, 2012 01:10AM
Возможно закрывающий слеш на root все портит?

Попробуйте так root /usr/share/nginx/www;

2012/2/27 slovoblydie <nginx-forum@nginx.us>

> Всех приветствую!
>
> Заранее прошу прощения за избитый
> вопрос, но долго листал форум.. так и не
> нашел способ решения.
> Поэтом создаю новый топик.
> Поставил nginx, одна за задач следующая:
> некий компьютер забирает файл из папки
> test-folder, и создает тут же файл отчета (txt
> файл).
> Банально хотел для начала получить
> листинг файлов в этой папке и получаю
> "403 Forbidden", вот error-лог:
>
> 2012/02/28 12:15:21 [error] 6416#0: *1 rewrite or internal redirection
> cycle while internal redirect to "/index.php", client: 192.168.0.1,
> server: 192.168.0.3, request: "GET /favicon.ico HTTP/1.1", host:
> "192.168.0.3"
> 2012/02/28 12:15:26 [error] 6416#0: *3 directory index of
> "/usr/share/nginx/www/test-folder/" is forbidden, client: 192.168.0.1,
> server: 192.168.0.3, request: "GET /cert1/ HTTP/1.1", host:
> "192.168.0.3", referrer: "http://192.168.0.3/"
>
>
> Конфиг-файл, прошу заметить он прост,
> мне кажется даже до безобразия прост:
> --------------------------------------------------
> server {
> listen 80;
> server_name localhost;
>
> root /usr/share/nginx/www/;
> index index.html index.htm index.php;
> access_log /usr/share/nginx/www/logs/access.log combined;
> error_log /usr/share/nginx/www/logs/error.log;
> allow all;
>
> location / {
> try_files $uri $uri/ /index.html;
> }
>
> location = /favicon.ico {
> log_not_found off;
> access_log off;
> }
>
> location ~ \.php$ {
> fastcgi_param HTTPS on;
> include fastcgi_params;
> }
>
> location ^~/test-folder/ {
> root /usr/share/nginx/www;
> autoindex on;
> autoindex_exact_size off;
> autoindex_localtime on;
> charset utf-8;
> allow all;
> }
> }
> --------------------------------------------------
>
> Так вот вопросики:
> 1) "internal redirect to "/index.php"" - это вообще как
> получается, если индексный файл index.html,
> и файл index.php отсутствует! и почему
> фигурирует favicon.ico, в конфиге, как видно
> обозначил этот файл.
>
> первый вопрос несущественный, так
> сказать мало волнующий, но всё же
> интересно, поэтому задаю вопрос.
>
> Теперь главное...
> 2) вторя часть лога показывает "directory index
> of "/usr/share/nginx/www/test-folder/" is forbidden" .. доступ
> запрещен. Если создаю в этой
> директории файл index.html - ошибки нету, но
> и листинга файлов нету. Скачивать
> конкретные файлы при этом могу.
> Пробовал chmod задавать 777,
> безрезультатно.
> Т.е. доступа на отображение - нету.
>
> заранее спасибо.
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?21,223045,223045#msg-223045
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

..directory index is forbiden..

slovoblydie February 27, 2012 08:11AM

Re: ..directory index is forbiden..

showjumper February 27, 2012 09:02AM

Re: ..directory index is forbiden..

slovoblydie February 28, 2012 12:20AM

Re: ..directory index is forbiden..

Rpsl February 28, 2012 01:10AM

Re: ..directory index is forbiden..

slovoblydie February 28, 2012 02:39AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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