Welcome! Log In Create A New Profile

Advanced

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

van
October 21, 2010 07:58AM
[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 ?
Subject Author Posted

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

van October 21, 2010 07:58AM

Re: изменение root не проходит через try_files

van October 24, 2010 03:13PM

Re: изменение root не проходит через try_files

mallrat June 17, 2011 09:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 174
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready