Rotatelogs truncate the log for configuration. However, after you save vhost.conf, the server httpd-k restart always fails to restart successfully.
Log file:
(2) No such file or Directory:AH00089:Couldn ' t start errorlog process ' ROTATELOGS/VAR/WWW/HTML/LOGS/ERROR/%Y/%M/%D_ERROR.L OG 86400 480 '. Ah00015:unable to open logs (2) No such file or Directory:AH00089:Couldn ' t start errorlog process ' rotatelogs/var/www/h Tml/logs/error/%y/%m/%d_error.log 86400 480 '. Ah00015:unable to open logscould not open log file '/home/zbphp.com/logs/access/2014/access__20141019.log ' (No such file or directory) ah00106:piped log program '/usr/sbin/rotatelogs/home/zbphp.com/logs/access/%y/access__%y%m%d.log 86400 480 ' failed unexpectedlycould not open log file '/home/zbphp.com/logs/access/2014/access__20141019.log ' (No such file or D irectory) ah00106:piped log program '/usr/sbin/rotatelogs/home/zbphp.com/logs/access/%y/access__%y%m%d.log 86400 480 ' failed unexpectedlycould not open log file '/home/zbphp.com/logs/access/2014/access__20141019.log ' (No such file or D irectory) ah00106:piped log Program '/usr/sbin/rotatelogs/home/zbphp.com/logs/access/%y/access__%y%m%d.log 86400 480 ' failed unexpectedlycould not open log file '/home/zbphp.com/logs/access/2014/access__20141019. Log ' (No such file or directory) ah00106:piped log program '/usr/sbin/rotatelogs/home/zbphp.com/logs/access/%y/access__ %y%m%d.log 86400 480 ' failed unexpectedly
Workaround:
1) Rotatelogs cannot write rotatelogs directly, must write the full address/usr/sbin/rotatelogs
2) Rotatelogs does not have permission to create a directory, so it is best not to add folders to the formatted address.
The correct wording:
Customlog "| /usr/sbin/rotatelogs/var/www/html/logs/access_%y%m%d.log 86400 480 "combined
by default7#zbphp.com
Linux Apache rotatelogs failure does not take effect causes and solutions