Home > Backend Development > PHP Tutorial > Open nginx pathinfo in lnmp one-click installation environment

Open nginx pathinfo in lnmp one-click installation environment

WBOY
Release: 2016-08-08 09:32:59
Original
978 people have browsed it

For questions and principles, please refer to: http://www.laruence.com/2009/11/13/1138.html

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

1. Comment try_files in nginx.conf (because it is duplicated with pathinfo.conf) and enable pathinfo.conf configuration:

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

Comment out line 4 and open line 8.

2. Restart nginx service:

nginx -s reload
Copy after login

The above introduces the nginx opening pathinfo in the lnmp one-click installation environment, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template