Home > Common Problem > body text

How to configure Nginx web

青灯夜游
Release: 2019-02-26 13:17:35
forward
3100 people have browsed it

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
Copy after login

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!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template