nginx File not found 错误
来源:互联网 发布:魔兽世界 mac版闪退 编辑:程序博客网 时间:2024/06/06 14:07
nginx配置php老是出错,浏览器打开php脚本报File not found 错误,最后才发现是$document_root的设置问题。
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
这个用出现找不到php的错误。因为$document_root 的参数是由root html那一行定义的,默认是在/etc/nginx/html/ 所以把 html换成站点根目录就正常了。
location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
阅读全文
0 0
- nginx File not found 错误
- nginx File not found 错误
- nginx File not found 错误
- nginx File not found 错误
- nginx File not found 错误
- nginx File not found 错误
- nginx File not found 错误
- nginx php file not found 错误
- nginx php-fpm file not found错误
- nginx报 File not found 错误
- nginx报 File not found 错误
- nginx File not found 错误(转) 404
- nginx php-fpm file not found错误
- nginx File not found.
- nginx File not found!
- nginx File not found
- nginx+php-fpm出现file not found错误
- nginx php file not found
- 面试知识点
- 拷贝构造函数
- windows 版本参考与分析
- plsql快速入门
- Spring七大模块之DAO (下)
- nginx File not found 错误
- offer
- 第三周-项目1-顺序表的基本运算
- 超大数据量的xlsx格式的excel文件的读取和解析,解决了POI方式的内存溢出和性能问题
- rsyslog 客户端配置
- 阻塞模式
- 第六周--拟合判断
- 电路板焊接完成发现CPU没有工作,需要从哪些方面考虑解决这个问题?
- android权限管理