禁用nginx日志 [英] Disable nginx logs

查看:180
本文介绍了禁用nginx日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在没有严重错误的情况下禁用nginx日志记录?

How to disable nginx logging, without crit errors?

关闭错误日志-无效,只是创建文件名关闭",实际上不是在开玩笑.

error_log off - doesnt works, just creates filename "off", really, not joke.

error_log dev/null不支持.

error_log dev/null doesnt supports.

OS freebsd.我需要为子域禁用日志记录.

OS freebsd. I need disable logging for subdomain.

推荐答案

http://wiki.nginx. org/CoreModule#error_log

来自Wiki

请注意,关闭error_log不会禁用日志记录-该日志将是 写入名为"off"的文件.要禁用日志记录,您可以使用:

Note that error_log off does not disable logging - the log will be written to a file named "off". To disable logging, you may use:

error_log /dev/null crit;

这篇关于禁用nginx日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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