This article to share the content is about Nginx and PHP installation and configuration of the three Nginx configuration file, has a certain reference value, the need for friends can refer to
1. Open configuration file:/usr/local/nginx-1.8.0/conf/nginx.conf
here Root is the directory that the code points to
server_name is the domain name
location/ represents a match for all URL perform a matching operation, here's a rewrite:
if (!-e $request _filename) {
Rewrite ^/(. *) $/index.php/$1 last;
}
This rewrite is a match to the URL matching the regular here is automatically added to the index.php, has helped us to automatically fill the url of the index.php function, shorten the length of our URL Access
Related recommendations:
Nginx and PHP installation and configuration one of the compiled installation nginx-1.8.0
Installation and configuration of Nginx and PHP installation and configuration two PHP-FPM