Home  >  Article  >  How to configure Nginx web

How to configure Nginx web

青灯夜游
青灯夜游forward
2019-02-26 12:26:293078browse

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 fail

service mginx restart

The above is the entire content of this article, I hope it will be helpful to everyone's study. For more exciting content, you can pay attention to the relevant tutorial columns of the PHP Chinese website! ! !

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!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete