Nginx + PHP 403 cause analysis

Source: Internet
Author: User
Tags fpm

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.