Quantcast
Channel: Nginx Forum - Nginx Mailing List - Russian
Viewing all articles
Browse latest Browse all 3102

Не могу понять логику (1 reply)

$
0
0
Пример конфига

server {
listen 80;
server_name site.ru;

root /home/www/site.ru;
index index.php;

location / {
try_files $uri /index.php?$uri;
}

location /admin {
try_files $uri /index.php?$uri;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

Я ожидаю, что поведение в location / и location /admin должно быть одинаковым. Но это не так, в папке /admin файлы .php не выполняются. Почему?

Viewing all articles
Browse latest Browse all 3102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>