ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

изменение root не проходит ч ерез try files


  • To: nginx-ru@xxxxxxxxx
  • Subject: изменение root не проходит ч ерез try files
  • From: "van" <nginx-forum@xxxxxxxx>
  • Date: Thu, 21 Oct 2010 07:58:50 -0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To:Date; bh=96Hm2sd1cl3itFowcuWk9oju/BhKY3dP0H0mFdCfQZ8=; b=V+KZ9p0p5M0mHLHGtN2U+/VXY065CX1DFBJA3TaIQjKryPKC92uaObjdK3/qiJmiEVC4Otsyza+90Qd35bbmjzRb7/NUZYjINQK3UhyrHd7hE9Eo+mYgvwJIRjD00yx/;

[code]
log_format  test  '$remote_addr - $remote_user [$time_local] "$request"
'
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"
"$document_root"';

        location ^~ /phpma/ {
            root   /usr/share/phpMyAdmin;
            index  index.php index.htm index.html;
            try_files  @php @php;
access_log /var/log/nginx/test1.log test;

        }
        }

        location / {
            root   /var/www/html;
            index  index.html index.htm index.php;
        }

        location @php {
access_log /var/log/nginx/test.log test;

            index  index.php index.htm index.html;
#            try_files  $uri $uri/index.php $uri/index.htm
$uri/index.html =404;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME 
$document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
[/code]



Если закоментить
[code]
            try_files  @php @php;
[/code]
то
в лог test1.log пишется нужный $document_root =
/usr/share/phpMyAdmin   
а так 
в логе test.log  $document_root = /usr/share/nginx/html

Как бы покрасивее в named location @php
передавать разные $document_root  ?

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,143104,143104#msg-143104


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.