首页 > LNMP应用服务器 > Nginx – Access denied 问题排查

Nginx – Access denied 问题排查

2016年6月1日

Nginx – Access denied 问题排查
http://blog.csdn.net/w6611415/article/details/40716563
In your php-fpm www.conf set security.limit_extensions to .php or .php5 or whatever suits your environment. For some users, completely removing all values or setting it to FALSE was the only way to get it working.

In your nginx config file set fastcgi_pass to your socket address (e.g. unix:/var/run/php-fpm/php-fpm.sock;) instead of your server address and port.

Check your SCRIPT_FILENAME fastcgi param and set it according to the location of your files.

In your nginx config file include fastcgi_split_path_info
^(.+\.php)(/.+)$; in the location block where all the other fastcgi params are defined.

In your php.ini set cgi.fix_pathinfo to 1

来源:Access denied (403) for PHP files with Nginx + PHP-FPM

补充:
6. 也有可能是文件权限的问题,没有读权限

本文的评论功能被关闭了.