Linux Apache rotatelogs failure does not take effect and the solution __linux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.