项目实际配置-api.youhujun.com
2025年5月31日小于 1 分钟
说明
因为是开发环境所以是宝塔目录
验证
/usr/sbin/logrotate -d /etc/logrotate.d/配置文件
手动强制执行
/usr/sbin/logrotate -vf /etc/logrotate.d/配置文件
laravel项目
位置
etc/logrotate.d/api_youhujun_com_exception_log
配置
/www/wwwroot/youhujun.com/api.youhujun.com/storage/logs/laravel.log {
su root root
daily
rotate 7
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500K
olddir /www/wwwroot/youhujun.com/api.youhujun.com/storage/logs/laravel
}
sql
位置
etc/logrotate.d/api_youhujun_com_sql_log
配置
exception
位置
etc/logrotate.d/api_youhujun_com_exception_log
配置
/www/wwwroot/youhujun.com/api.youhujun.com/storage/logs/exception.log {
su root root
daily
rotate 7
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500K
olddir /www/wwwroot/youhujun.com/api.youhujun.com/storage/logs/exception
}
websocket
位置
etc/logrotate.d/websocket_log
配置
/www/wwwlogs/websocket/websocket.log {
su root root
daily
rotate 7
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500K
olddir /www/wwwlogs/websocket/day
}
laravel-echo-server
位置
etc/logrotate.d/laravel_echo_server_log
配置
/www/wwwlogs/laravel-echo-server/laravel-echo-server.log {
su root root
daily
rotate 7
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500K
olddir /www/wwwlogs/laravel-echo-server/day
}
queue
位置
etc/logrotate.d/queue_log
配置
/www/wwwlogs/queue/queue.log {
su root root
daily
rotate 7
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500K
olddir /www/wwwlogs/queue/day
}
php工具箱的mysql
位置
etc/logrotate.d/php_tool_mysql_log
配置
/www/wwwlogs/mysql_bz.log {
su root root
daily
rotate 7
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500K
olddir /www/wwwlogs/mysql
}