Enable pathinfo for nginx in the one-click lnmp installation environment

Source: Internet
Author: User
: This article describes how to enable pathinfo for nginx in the one-click lnmp installation environment. if you are interested in the PHP Tutorial, refer to it. The problem and principle can refer to: http://www.laruence.com/2009/11/13/1138.html

If you use the lnmp script to install the development environment with one click, you can open a pathinfo account as follows:

1. comment out try_files in nginx. conf (because it is already in the pathinfo. conf file) and enable pathinfo. conf configuration:

1 location ~ [^/] \. Php (/| $) 2 {3 # comment try_files $ uri = 404; to enable pathinfo4 # try_files $ uri = 404; 5 fastcgi_pass unix:/tmp/php-cgi.sock; 6 fastcgi_index index. php; 7 include fastcgi. conf; 8 include pathinfo. conf; 9}

Comment out 4th rows and open 8th rows.

2. restart the nginx service:

Nginx-s reload

The above describes how to enable pathinfo for nginx in the one-click installation environment of lnmp, including related content, and hope to help friends who are interested in PHP tutorials.

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.