Nginx PHP Extension replaces the access denied. Resolve

Source: Internet
Author: User
Tags fpm

Want to put. asmx as. php to execute, the Access denied appears. Error.


Location ~ [^/]\.asmx (/|$)
#location ~ *\. (php|asmx)? $
{
# comment try_files $uri = 404; To enable PathInfo
Try_files $uri = 404;
Fastcgi_pass Unix:/tmp/php-cgi.sock;
Fastcgi_index index.php;
Include fastcgi.conf;
#include pathinfo.conf;
}


Modified:/usr/local/php/etc/php-fpm.conf followed by a line: Security.limit_extensions =. php. asmx. html. js. css. jpg. jpeg. gif. png. M


[Global] pid =/usr/local/php/var/run/php-fpm.pid
Error_log =/usr/local/php/var/log/php-fpm.log
Log_level = Notice


[WWW]
Listen =/tmp/php-cgi.sock
Listen.backlog =-1
Listen.allowed_clients = 127.0.0.1
Listen.owner = www
Listen.group = www
Listen.mode = 0666
user = www
Group = www
PM = dynamic
Pm.max_children = 20
Pm.start_servers = 10
Pm.min_spare_servers = 10
Pm.max_spare_servers = 20
Request_terminate_timeout = 100
Request_slowlog_timeout = 0
Slowlog = Var/log/slow.log

security.limit_extensions =. php. asmx. html. js. css. jpg, JPEG, gif. png. htm



Description: Starting with 5.3.9, the PHP official has added a configuration "Security.limit_extensions", which allows only files with the extension ". php" to be executed by default, causing problems that are not supported by other types of files.

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.