1. View Nginx configuration file
Command nginx -t, as shown in the figure
2. Enter the configuration file directory and view the directory
cd /usr/loxa/nginx/conf, you can see that there is an nginx.conf file and a vhost directory
3. Let’s edit nginx.conf first, the main service
Here is another configuration
Finally, you can import the vhost file just now. At the beginning, it is empty
Next, let’s take a look at the files in this directory and open one to view
This is all the files of the two sites
After the change, service nginx reload (nginx configuration reload)
The above is the detailed content of How to configure web server with Nginx. For more information, please follow other related articles on the PHP Chinese website!