【发布时间】:2018-10-21 08:24:15
【问题描述】:
我已在 /etc/nginx/sites-enabled/*.conf 文件中包含以下行以从访问日志、favicon、php、站点地图消息中删除:
包括 access_log_rules/log_off.conf;
log_off.conf 文件内容:
location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~ \.php$ {
access_log off;
log_not_found off;
}
location = /sitemap.xml {
log_not_found off;
access_log off;
}
问题是我无法启动nginx,遇到如下错误:
nginx:[emerg] 重复位置“/favicon.ico”在 /etc/nginx/access_log_rules/log_off.conf:1
如果我搜索该语句的重复项,则没有。 "grep -rnw '/etc/nginx' -e 'favicon.ico'"
【问题讨论】:
标签: nginx-config