Answer the question
In order to leave comments, you need to log in
Why directory of index nginx 403?
2019/05/29 14:32:50 [error] 252095#252095: *16510 directory index of "/var/www/www-root/data/www/subdomain.site.ru" is forbidden, client: IP, server : subdomain.site.ru, request: "GET / HTTP/1.1", host: "subdomain.site.ru, referrer: " http://subdomain.site.ru/ "
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 [email protected]сайт.ру";
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 [email protected]поддомен.сайт.ру";
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;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question