Home > Article > Operation and Maintenance > 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模块中
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
##Then restart nginx to take effectnginx -t nginx -s reloadRelated recommendations:
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!