nginx設定中,關於php的設定有錯誤會導致nginx無法存取php。
找不到存取php找不到文件,修改下方配置
nginx.conf:
location ~ \.php$ { proxy_pass http://127.0.0.1:80; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; #fastcgi_param SCRIPT_FILENAME /$document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name; include fastcgi_params; }
以上是nginx無法存取php的詳細內容。更多資訊請關注PHP中文網其他相關文章!