Rotatelogs truncate the log for configuration. However, after saving vhost.conf, the server httpd-k restart always fails to reboot successfully.
Log file:
[Plain] View Plain copy (2) no such file or directory: ah00089: couldn ' t start ErrorLog process ' rotatelogs /var/www/html/logs/error/%y/%m/%d_error.log 86400 480 ' . ah00015: unable to open logs (2) No such file or directory: ah00089: couldn ' t start errorlog process ' rotatelogs /var/www/html/logs/error/%y/%m/%d_error.log 86400 480 ' . AH00015: Unable to open logs Could not open log file '/home/google.com/logs/access/2014/access__20141019.log ' (no such file or directory) ah00106: piped log program '/usr/sbin/rotatelogs /home/ google.com/logs/access/%y/access__%y%m%d.log 86400 480 ' failed unexpectedly Could not open log file '/home/google.com/logs/access/2014/access__20141019.log ' (No such file or directory) ah00106: piped log program '/usr/sbin/ rotatelogs /home/google.com/logs/access/%y/access__%y%m%d.log 86400 480 ' failed unexpectedly could not open log file '/home/google.com/logs/access/2014/ Access__20141019.log ' (no such file or directory) ah00106: piped log program '/usr/sbin/rotatelogs /home/google.com/logs/access/%y/access__%y%m%d.log 86400 480 ' failed unexpectedly could not open log file '/home/google.com/logs/access/2014/access__20141019.log ' (no such file or directory) ah00106: piped log program '/usr/sbin/rotatelogs /home/ Google.com/logs/access/%y/access__%y%m%d.log 86400 480 ' failed unexpectedly
Solution:
1) Rotatelogs can not write rotatelogs directly, must write 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 "combined
by default7#google.com