nginx:为什么要配置多个conf文件? [英] nginx: why multiple conf files?

查看:610
本文介绍了nginx:为什么要配置多个conf文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在单个安装中有多个nginx conf文件.这是我发现的:

There are multiple nginx conf files on single installation. Here is what I found:

  1. /opt/nginx/conf/nginx.conf
  2. /etc/nginx/nginx.conf
  3. /etc/nginx/sites-available/default
  4. 更多关于/etc/nginx/conf.d
  5. /etc/nginx/sites-available中的更多信息

这些多个conf文件有什么用?如果发生冲突该怎么办?主副本是哪一个?

What's the use of those multiple conf files? What is going to happen if there are conflict? Which one is the master copy?

推荐答案

/etc/nginx/nginx.conf开始,所有其他文件都放入included.有关详细信息,请参见本文档.

Start with /etc/nginx/nginx.conf, all of the other files are included into it. See this document for details.

使用nginx -T查看完整的配置,就像nginx看到的一样.

Use nginx -T to see the complete configuration as nginx sees it.

这篇关于nginx:为什么要配置多个conf文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆