|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
apache loging issues
I have ran into a problem with apache. It has been loging find for the past 2 months then last week when the logs rotated it stoped loging. All I did to fix it was restart apache. What would cause this problem. The httpd.conf file has not changed in 2 months. any help will be very appricated.
Thanks in advance.
__________________
Jon Whitcraft ![]() Web Applications Developer :: Zend Certified Engineer http://www.indianapolismotorspeedway.com/ Quote:
|
|
#2
|
|||
|
|||
|
How do you rotate it? Keep in mind, whenever you moved or altered your log file by hand or via a script without sending a HUP signal to Apache, the inode will change and Apache will refuse to write to the new log file.
|
|
#3
|
||||
|
||||
|
I use the logrotate program that came installed on the system. Should I modify the cron job to restart apache after it rotates the logs?
|
|
#4
|
|||
|
|||
|
I have never used logrotate so I can't help you on that. However, the terminology is the same. So make sure you don't alter, move or do anything (parsing is fine) to the log file while Apache is running. The next thing to look for is permission. It looks like Apache no longer has the permission to write to the new log file.
>> Should I modify the cron job to restart apache You need to check logrotate manual. Though it's perfectly fine to send a graceful to apachectl via cronjob occasionally. |
|
#5
|
||||
|
||||
|
I am just wondering what you use to do the rotate your logs? do you use the log rotate feature of apache? if so how does that work?
Thanks in advance |
|
#6
|
|||
|
|||
|
I use newsyslog -> /etc/newsyslog.conf.
For example: Code:
/var/log/apache/access_log 600 7 300 * Z /var/run/httpd.pid - Rotate it when it reaches 300kb - Keep 7 /var/log/apache/access_log.x.gz maximum (probably never reach it anyway because I use another mechanism to move xxx_log.x.gz files out of /var/log/ so I have a cleaner /var/log at all time) - Chmod it 600 - Give Apache a HUP signal |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > apache loging issues |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|