Environment: Nginx + PHP
Problem:
Configuration of Web site, access error: Access Denied (403)
Workaround:
1, in your php-fpm www.confSetSecurity.limit_extensions to. php or. php5 or whatever suits your environment. For some users, completely removing any values or setting it to FALSE is the onlyGetit working.2, in your nginx config fileSetFastcgi_pass to your socket address (e.g. unix:/var/run/php-fpm/php-Fpm.sock;) Instead of your server address and port.3, Check your script_filename fastcgi param andSetIt according the location of your files.4, in your nginx config file include Fastcgi_split_path_info ^ (. +\.php) (/.+) $;inchThe location blockwhereAll the other fastcgiparamsis defined.5, in your php.iniSetCgi.fix_pathinfo to16, there may be a problem with file permissions, and there is no Read permission.
Original link: http://stackoverflow.com/questions/23390531/access-denied-403-for-php-files-with-nginx-php-fpm
Nginx + PHP 403 cause analysis