nginx php-fpm 访问.php文件出现Access denied.
nginx的access.log就像这样:
2014/01/05 22:26:33 [error] 12519#0: *1517
FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/usr/www/index.php) is not within the allowed path(s): (.:/tmp/) in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Unable to open primary script: /usr/www/index.php (Permission denied)" while reading response header from upstream,
client: 192.186.56.55, server: test.localhost.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: " test.localhost.com" 192.186.56.56 - - [05/Jan/2014:22:26:33 +0800] "GET / HTTP/1.1" 403 25 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36"访问.html正常的..访问.php的就会出现Access denied.
谢谢各位...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
非常感谢
其实这个报错很容易理解,说open_basedir受到了限制
我找到了这一篇文章,希望对你有用
http://www.oschina.net/question/878142_106780