VPS侦探论坛
标题:
安装lnmpa1.2后,切割日志脚本对如下日志无能为力
[打印本页]
作者:
mototown
时间:
2016-9-4 22:06
标题:
安装lnmpa1.2后,切割日志脚本对如下日志无能为力
1、论坛里流传的nginx切割日志脚本里,无法切割
access_log
error_log
IP-access_log
IP-error_log 这四个日志
因为这四个文件后缀不是.log
2、
error_log有如下提示,suexec要干吗啊?
[Sun Sep 04 21:48:39 2016] [notice] caught SIGTERM, shutting down
[Sun Sep 04 21:56:15 2016] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Sep 04 21:56:15 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Sun Sep 04 21:56:15 2016] [notice] Digest: generating secret for digest authentication ...
[Sun Sep 04 21:56:15 2016] [notice] Digest: done
[Sun Sep 04 21:56:15 2016] [notice] Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips DAV/2 PHP/5.3.29 configured -- resuming normal operations
复制代码
3、/home/wwwlogs/有如下日志
access_log /apache产生
access.log /nginx 产生
error_log /apache产生
IP-access_log /由谁产生的
IP-error_log /由谁产生的
nginx_error.log /nginx产生的
[
本帖最后由 mototown 于 2016-9-4 23:07 编辑
]
作者:
mototown
时间:
2016-9-4 23:46
第一个问题解决了
#cut nginx log files
for((i=0;i<$log_files_num;i++));do
mv ${log_files_path}${log_files_name
}
.log
${log_files_dir}/${log_files_name
}_$(date -d "yesterday" +"%Y%m%d").log
把标红的地方去掉,
log_files_name=(
access vpser licess
)
把标蓝的地方改成以上六个log的名字即可
[
本帖最后由 mototown 于 2016-9-4 23:47 编辑
]
作者:
licess
时间:
2016-9-5 08:50
只有nginx有日志切割脚本
文件名只是文件名,和什么后缀没啥关系,linux上不是通过什么后缀来确定文件类型
/home/wwwlogs 里除了nginx就是apache的日志,ip开头的肯定就是apache的日志
作者:
mototown
时间:
2016-9-6 22:20
标题:
回复 3# 的帖子
军哥,快来救场啊,出错了,排除不了,
错误详情,
https://bbs.vpser.net/thread-14422-1-1.html
欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/)
Powered by Discuz! X3.4