: 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.