原来的nginx 配置 lnmp 环境默认的
location ~ [^/]\.php(/|$) { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; }
修改为
location ~ \.php$ { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; }
想必你们知道是什么原因了吧
原文地址:https://www.cnblogs.com/pa200318/p/10740510.html
时间: 2024-10-12 03:42:57