[英]strange condition file not found nginx with php-fpm
我从2年开始使用此配置,没有任何问题
突然我遇到了找不到来自niginx的错误消息
并且仅当链接具有“?”时才出现 样品
domain/index.php?a=browse&b=category&id=1
如果打开普通链接,则可以正常工作(不带“ php?”)
domain/index.php
domain/[any other php file].php
站点配置(更改的用户信息)
server {
listen *:80;
server_name domain;
rewrite_log on;
root /home/user/public_html/;
location / {
index index.php index.html index.htm ;
}
location ~*^.+\.jpg|jpeg|gif|css|html|png|js|ico|bmp|zip|rar|txt|pdf|doc)$ {
root /home/user/public_html/;
# expires max;
access_log off;
}
location ~ ^/.+\.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_intercept_errors on;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
}
}
尝试使用ip将其更改为
server_name domain;
至
server_name serverip;
并测试网址
serverip/index.php?a=browse&b=category&id=1
你可以用ssh comand来检查它
wget localhost/index.php?a=browse&b=category&id=1
如果可行,请检查防火墙或cloudflare之类的服务
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.