标签:时报 oca ref 参考 ror known cto rom nginx配置
小生博客:http://xsboke.blog.51cto.com小生 Q Q:1770058260
-------谢谢您的参考,如有疑问,欢迎交流
2018/08/03 01:05:34 [error] 57141#0: *242 FastCGI sent in stderr: "Primary script unknown" while reading
response header from upstream, client: 172.16.6.237, server: localhost, request: "GET /test.php HTTP/1.1",
upstream: "fastcgi://127.0.0.1:9000", host: "172.16.6.236"
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
location ~ \.php$ {
root html;
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;
include fastcgi_params;
}
解释:$document_root 就是nginx配置项“root”指定的位置参数的变量
测试PHP是否安装成功时,nginx报错:"Primary script unknown"
标签:时报 oca ref 参考 ror known cto rom nginx配置
原文地址:http://blog.51cto.com/xsboke/2153734