|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
||||
|
||||
|
gz logs
I am wondring how you set up apahe to gz the logs when it rotates them.
Thanks
__________________
Jon Whitcraft ![]() Web Applications Developer :: Zend Certified Engineer http://www.indianapolismotorspeedway.com/ Quote:
|
|
#2
|
|||
|
|||
|
There are many Apache log rotation program out there that can rotate and gz your old logs and restart Apache automatically. If you don't like the 3rd party log rotation program, your system should come with newsyslog. man 8 newsyslog to find out how to configure /etc/newsyslog.conf exactly.
Okay, here is an example on FreeBSD system: /var/log/apache/error_log 600 5 200 * Z /var/run/httpd.pid #(tab delimited) In this example: - the full path to my apache error_log is /var/log/apache/error_log - permission should be 600 - there should be a maximum of 5 error_log*.gz file in /var/log/apache/ - when the file size reaches 200kb, do the rotation - * is for time, it doesn't apply here because you are rotating it based on file size - Z is to gzip your error_log file after rotation - /var/run/httpd.pid is the pid file for Apache so newsyslog will HUP your apache automatically |
|
#3
|
||||
|
||||
|
Thanks for the help. I found a nifty little program called: logrotate it is a very cool program.
|
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > gz logs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|