1.find / -name nginx.conf找到nginx配置文件
2.找到location
location ~ \.php {#去掉这里的$
root /var/www/html;
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_params;
}
3.重启nginx,find / -name nginx找到sbin目录执行./nginx -s reload
时间: 2024-11-07 09:03:48