windows 下配置nginx+php : http://www.rzrgm.cn/huayangmeng/archive/2011/06/15/2081337.html
nginx 403 forbidden
網上有得到三種會產生這個問題的原因:
1,指定的webRoot目錄權限不足:提升權限
2,要訪問的文件不存在:假如整合了php,你會運行 localhost,其實要訪問的是webRoot下面的index.php文件,這個時候就需要查看這個文件是不是不存在了。如果不存在,添加上要訪問的文件
3,配置出錯,nginx默認不支持訪問index.php所以需要添加上index.php,如下:
location / {
root D:/web/cg;
index index.html index.htm index.php;
}
No input file specified
問題原因:http://blog.163.com/cobyeah@126/blog/static/140137653201142945054441/
解決方法:
location ~ \.php$ {
root D:/wnmp/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
浙公網安備 33010602011771號