参考 https://blog.csdn.net/sinat_36281252/article/details/54620168
server{
listen 80;
server_name integral.linggongbang.cn;
index index.php index.html index.htm;
root /data/www/integral;
location ~\.php #原来这个里有“$” 去掉就ok
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$; #新加第一句
fastcgi_param PATH_INFO $fastcgi_path_info;#新加第二句
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;#新加第三句
include fastcgi.conf;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
}
网友评论