KaMaToZzz
@KaMaToZzz

Fastcgi добавляет /index.html?

Здравствуйте,

Использую связку nginx-apache в панели ispmanager. Как включаю FastCGI, то получаю вот такую ошибку. FastCGI походу где-то сам добавляет /index.html - но не могу найти где

[error] 16285#0: *907 "/var/www/siteman/data/www/site.ru/2012/07/30/some-topic/index.html" is not found (2: No such file or directory), client: 66.24.72.45, server: site.ru, request: "GET /2012/07/30/some-topic/ HTTP/1.1", host: "site.ru"

server {
        server_name site.ru www.site.ru;
        charset UTF-8;
        disable_symlinks if_not_owner from=$root_path;
        index index.html index.php;
        root $root_path;
        set $root_path /var/www/siteman/data/www/site.ru;
        ssi on;
        access_log /var/www/httpd-logs/site.ru.access.log ;
        error_log /var/www/httpd-logs/site.ru.error.log notice;
        include /etc/nginx/vhosts-includes/*.conf;
        location / {
                location ~ [^/]\.ph(p\d*|tml)$ {
                        try_files /does_not_exists @php;
                }
        }
        location @fallback {
                error_log /dev/null crit;
                access_log off ;
        }
        location @php {
                fastcgi_index index.php;
                fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@site.ru";
                fastcgi_pass unix:/var/www/php-fpm/siteman.sock;
                fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
                try_files $uri =404;
                include fastcgi_params;
        }
        listen 18.55.22.22:80;
}
  • Вопрос задан
  • 2353 просмотра
Пригласить эксперта
Ответы на вопрос 1
@Arik
nginx.org/ru/docs/http/ngx_http_index_module.html
Модуль ngx_http_index_module обслуживает запросы, оканчивающиеся слэшом (‘/’). Такие запросы также могут обслуживаться модулями ngx_http_autoindex_module и ngx_http_random_index_module.


Если правильно понял:
Происходит внутренняя переадресация
site.ru/2012/07/30/some-topic/ -> site.ru/2012/07/30/some-topic/index.html
и location ~ [^/]\.ph(p\d*|tml)$
уже не подходит для текущего запроса.
Ответ написан
Комментировать
Ваш ответ на вопрос

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

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