How to configure web server with Nginx

PHPz
Release: 2023-05-14 16:40:14
forward
1962 people have browsed it

1. View Nginx configuration file

Command nginx -t, as shown in the figure

How to configure web server with Nginx

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

How to configure web server with Nginx

3. Let’s edit nginx.conf first, the main service

How to configure web server with Nginx

Here is another configuration

How to configure web server with Nginx

Finally, you can import the vhost file just now. At the beginning, it is empty

How to configure web server with Nginx

Next, let’s take a look at the files in this directory and open one to view

How to configure web server with Nginx

This is all the files of the two sites

How to configure web server with Nginx

How to configure web server with Nginx

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!

Related labels:
source:yisu.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