@braindev

Почему directory of index nginx 403?

2019/05/29 14:32:50 [error] 252095#252095: *16510 directory index of "/var/www/www-root/data/www/поддомен.сайт.ру" is forbidden, client: IP, server: поддомен.сайт.ру, request: "GET / HTTP/1.1", host: "поддомен.сайт.ру, referrer: "http://поддомен.сайт.ру/"


Права у файлов 644, у директорий 755 как и рекомендуется, права и владелец у файлов www-root, в /etc/nginx/nginx.conf user стоит www-root, при открытии ошибка 403, текущий конфиг nginx для поддомена, используется панелька Isp Manager

spoiler
server {
	server_name поддомен.сайт.ру www.поддомен.сайт.ру;
	charset off;
	index index.php index.html;
	disable_symlinks if_not_owner from=$root_path;
	include /etc/nginx/vhosts-includes/*.conf;
	include /etc/nginx/vhosts-resources/поддомен.сайт.ру/*.conf;
	access_log /var/www/httpd-logs/поддомен.сайт.ру.access.log;
	error_log /var/www/httpd-logs/поддомен.сайт.ру.error.log notice;
	ssi on;
	set $root_path /var/www/www-root/data/www/botadmin.сайт.ру/web;
	root $root_path;
	location / {
    	# Redirect everything that isn't a real file to index.php
        try_files $uri $uri/ /index.php$is_args$args;
		location ~ [^/]\.ph(p\d*|tml)$ {
			try_files /does_not_exists @php;
		}
    }
	location ~ \.php$ {
		fastcgi_index index.php;
		fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@сайт.ру";
		fastcgi_pass unix:/var/www/php-fpm/www-root.sock;
		fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
		try_files $uri =404;
		include fastcgi_params;
	}
	set $root_path /var/www/www-root/data/www/поддомен.сайт.ру;
	listen айписервера:80;
	location @php {
		fastcgi_index index.php;
		fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@поддомен.сайт.ру";
		fastcgi_pass unix:/var/www/php-fpm/www-root.sock;
		fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
		try_files $uri =404;
		include fastcgi_params;
	}
}

  • Вопрос задан
  • 416 просмотров
Пригласить эксперта
Ответы на вопрос 1
@omsknews
вероятно индексного файла нет, или он называется не так как в конфиге сказано )
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы