The content of this article is to introduce how Nginx configures the web, so that everyone can understand the method of Nginx configuring the web. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
1. View the 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 there is an nginx.conf file and a vhost directory
3. Let’s edit nginx.conf first , the main service
This is another configuration
Finally, you can introduce the vhost file just now, start When it is empty
Then let’s take a look at the files in this directory and open one to view
This That’s all the files of the two sites
## After the change, service nginx reload (nginx configuration reload)will Prompt you how many files to enter, or how many lines to failservice mginx restart
The above is the detailed content of How to configure Nginx web. For more information, please follow other related articles on the PHP Chinese website!