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

Andrei Nigmatulin andrei.nigmatulin at gmail.com
Fri Sep 19 01:25:20 MSD 2008


On Friday 19 September 2008 01:11, Борис Долгов 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 - правильный.
> Как можно это объяснить?
> Заранее спасибо.

-- 
Andrei Nigmatulin
GPG PUB KEY 6449830D

Now I lay me down to sleep(3)
Pray the OS my core to keep
If I die before I wake
Pray the Disk my core to take


More information about the nginx-ru mailing list