Log日志切割
logrotate
1 | vim /etc/logrotate.d/nginx |
Nginx
1 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
shell脚本
1 | #!/bin/bash |
日志压缩
1 | #!/usr/bin/sh |
1 | vim /etc/logrotate.d/nginx |
1 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
1 | #!/bin/bash |
1 | #!/usr/bin/sh |