How to create multiple configuration files in nginx

王林
Release: 2020-12-18 10:16:19
forward
6259 people have browsed it

How to create multiple configuration files in nginx

First of all, we need to make it clear that nginx can create multiple configuration files. If an nginx can only create one configuration file, it would be a waste of resources.

(Learning video sharing: Programming video)

The specific method is as follows:

First add a line of code to the main configuration file

vi /usr/local/nginx/conf/nginx.conf

include conf.d/*.conf; #将这行代码写在http模块中
Copy after login

Note: Do not write the wrong location, otherwise the configuration will not take effect

The name of the configuration file must be written *.conf For example: download.conf web.conf

How to create multiple configuration files in nginx

##Then restart nginx to take effect

nginx -t
nginx -s reload
Copy after login
Related recommendations:

nginx tutorial

The above is the detailed content of How to create multiple configuration files in nginx. For more information, please follow other related articles on the PHP Chinese website!

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