项目实际配置-www.taisheng.xyz
2025年5月31日小于 1 分钟
说明
接手搭建的生产环境
验证
/usr/sbin/logrotate -d /etc/logrotate.d/配置文件手动强制执行
/usr/sbin/logrotate -vf /etc/logrotate.d/配置文件创建目录
cd /data/wwwroot/junziyun/storage/logs && mkdir laravel && mkdir exception && mkdir sql && mkdir websocket && mkdir laravel-echo-server && mkdir queuelaravel项目
位置
etc/logrotate.d/www_taisheng_xyz_laravel_log
配置
/data/wwwroot/junziyun/storage/logs/laravel.log {
su root root
daily
rotate 12
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500M
olddir /data/wwwroot/junziyun/storage/logs/laravel
}sql
位置
etc/logrotate.d/www_taisheng_xyz_sql_log
配置
/data/wwwroot/junziyun/storage/logs/sql.log {
su root root
daily
rotate 40
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500M
olddir /data/wwwroot/junziyun/storage/logs/sql
}exception
位置
etc/logrotate.d/www_taisheng_xyz_exception_log
配置
/data/wwwroot/junziyun/storage/logs/exception.log {
su root root
daily
rotate 20
create
missingok
copytruncate
notifempty
nocompress
dateext
size 5M
olddir /data/wwwroot/junziyun/storage/logs/exception
}websocket
位置
etc/logrotate.d/www_taisheng_xyz_websocket_log
配置
/data/wwwroot/junziyun/storage/logs/websocket.log {
su root root
daily
rotate 10
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500M
olddir /data/wwwroot/junziyun/storage/logs/websocket
}laravel-echo-server
位置
etc/logrotate.d/www_taisheng_xyz_laravel_echo_server_log
配置
/data/wwwroot/junziyun/storage/logs/laravel-echo-server.log {
su root root
daily
rotate 10
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500M
olddir /data/wwwroot/junziyun/storage/logs/laravel-echo-server
}queue
位置
etc/logrotate.d/www_taisheng_xyz_queue_log
配置
/data/wwwroot/junziyun/storage/logs/queue.log {
su root root
daily
rotate 10
create
missingok
copytruncate
notifempty
nocompress
dateext
size 500M
olddir /data/wwwroot/junziyun/storage/logs/queue
}