This article mainly describes the main process of configuring the web server with Nginx. Interested friends can take a look!
1. View the configuration file of Nginx
Command nginx -t, such as 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. vhost directory
3. We first edit nginx.conf, the main service
This is another configuration
Finally, you can import the vhost file just now. It will be empty at the beginning
Let’s take a look Open a file in this directory to view
This is all the files of the two sites
After the change, service nginx reload (nginx configuration reload)
Related tutorials: HTML video tutorial
Want to know more For more technical tutorials, please pay attention to PHP中文网 for more tutorials. I wish you become a big player in the industry!
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!