nginx 关闭日志;其实一种方法就是写入/dev/null 文件 或者设置关闭;

nginx 日志有两个类型 

access.log  http 记录访问日志。

error.log   server 操作记录日志

1、关闭 http 记录访问日志
access_log off;

access_log /dev/null;
2、关闭 server 操作日志: error_log /dev/null;

清空 占用程序的日志;

nginx或者tomcat 或者其他占用程序 清除日志;
cat /dev/null > test.logecho " " > test.log

直接 rm  删除 导致空间不释放;

ps -ef|grep delete
kill -9 pid 

相关文章:

  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-02-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
猜你喜欢
  • 2021-10-08
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
相关资源
相似解决方案