Home >Backend Development >PHP Tutorial >Nginx and PHP installation and configuration three nginx configuration files
The content shared with you in this article is about the installation and configuration of Nginx and PHP. The configuration file of nginx has a certain reference value. Friends in need can refer to it
1. Open the configuration file: /usr/local/nginx-1.8.0/conf/nginx.conf
here root is the directory pointed to by the code
server_name is the domain name
location/ indicates matching All url perform post-matching operations. Here is a rewrite:
if (!-e $request_filename){
## . #
Thisrewrite
means that it will automatically match the url that matches the regular rules here. Adding index.php helps our url to automatically add index.php## The role of # shortens our url access length
Related recommendations:
##Nginx and PHP installation and configuration - Compile and install nginx-1.8.0
Nginx and php installation and configuration 2 Installation and configuration php-fpm
The above is the detailed content of Nginx and PHP installation and configuration three nginx configuration files. For more information, please follow other related articles on the PHP Chinese website!