странное поведение document_root

Roxis roxis at list.ru
Fri Sep 19 01:22:53 MSD 2008


On Thursday 18 September 2008, Борис Долгов wrote:
> Добрый вечер,
> имеем след. конфиг:
>     server {
>         listen       80;
>         server_name  nnn;
>         root /home/web/nnn;
>         rewrite  ^(.*).(html)$ /index.php?cat=$1&$query_string last;
>         location / {
>             index  index.php index.html index.htm;
>         }
>         location ~ \.php$ {
>             root           html;

>             fastcgi_pass   127.0.0.1:9000;
>             fastcgi_index  index.php;
>             fastcgi_param  SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
>             log_format cgi '$document_root$fastcgi_script_name';
>             access_log logs/cgi.txt cgi;
>             include        fastcgi_params;
>         }
>         location ~ /\.ht {
>             return 403;
>         }
>
> в logs/cgi.txt:
> /usr/local/nginx/html/index.php
> Без рерайта $document_root - правильный.
> Как можно это объяснить?
> Заранее спасибо.
убрать "root html;" из location ~ \.php$





More information about the nginx-ru mailing list