You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Nginx配置access_log使用timing格式报错的问题咨询

Nginx配置access_log使用timing格式报错的问题咨询

大家好,我目前在用Nginx 1.14.1版本配置反向代理,写了一段配置片段后出现了错误,想请大家帮忙看看问题出在哪。

我的配置里和日志相关的部分是这样的:

# 应用专属日志
access_log /var/log/nginx/yourdomain.com-access.log timing;
error_log /var/log/nginx/yourdomain.com-error.log;

当我执行nginx -t检查配置合法性的时候,得到了这样的报错:

nginx: [emerg] unknown log format "timing" in /etc/nginx/conf.d/virtual.conf:27
nginx: configuration file /etc/nginx/nginx.conf test failed

我有点疑惑,这个timing日志格式是Nginx新版本或者Plus版本才有的特性吗?还是说我需要先在某个地方定义这个timing格式才能使用呢?

备注:内容来源于stack exchange,提问作者Special Monkey

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 09:23:07