Any type of nginx+php (. py) is interpreted as a PHP configuration method

Source: Internet
Author: User
Take a. py file as an example

1. Configure location in ngxin.conf

... server {    Listen-       default;    server_name  _;        Index index.html index.htm index.php;        Root/alidata/www/default;        Location ~. *\. (php|php5|py) $        {                fastcgi_pass  127.0.0.1:9000;                Fastcgi_index index.php;                Include fastcgi.conf;        }        Location ~. *\. (gif|jpg|jpeg|png|bmp|swf) $        {                expires 30d;        }        Location ~. *\. (JS|CSS)? $        {                expires 1h;        }        Access_log  /alidata/log/nginx/access/default.log;} ...

2. Modify the php-fpm.conf configuration file

security.limit_extensions =. php. php3. PhP4. php5 . PY

The above describes the nginx+php of any type (. py) is interpreted as a PHP configuration, including aspects of the content, I hope to be interested in PHP tutorial friends helpful.

  • Related Article

    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.