解析Linux Nginx无法解析php的方法
当用Nginx+php-fpm方式使用php的时候,如果访问php文件出现file not found的问题可以用如下方法解决
将root注释掉,并且修改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;
}
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇:没有了
- 下一篇: Linux下PHP7使用xhprof分析性能
