nginx: [warn] "log_format" directive used only on "ht

qqcorporation71098 17 0 pdf 2021-07-10 19:07:23

将nginx升级到1.2.4稳定版之后,会发现之前的vhost/*.conf中的日志配置都报了如下的warn:但是这样的又会产生一个问题,就是各子域名的日志文件都会记录所有请求的日志,等了好久都没找到解决方案,后来请教了飞飞之后终于找到解决的方法了。原来log_format需要在nginx.conf的http层定义,然后在分域名下面就不用定义log_format,直接引用即可,即:在nginx.conf中http层添加:

nginx: [warn] "log_format" directive used only on "ht

用户评论
请输入评论内容
评分:
暂无评论