美文网首页
nginx 关闭日志

nginx 关闭日志

作者: 不排版 | 来源:发表于2018-03-21 11:08 被阅读31次

用Nginx做Web服务器,如果没有处理好日志,日志文件可能会很恐怖~

可以修改nginx.conf 找到access_log:

access_log /dev/null;

error_log /dev/null;

这样全部把他们丢到系统的黑洞里了

不用每时每刻都往系统磁盘疯狂的读写日志了 还延长硬盘的寿命

修改完,重启Nginx

相关文章

网友评论

      本文标题:nginx 关闭日志

      本文链接:https://www.haomeiwen.com/subject/zhbwqftx.html