LogRotate tomcat and apache

  • /etc/logrotate.d/apache2
/var/log/apache2/*.log {
	daily
	missingok
	rotate 7
	compress
	delaycompress
	notifempty
	create 640 root adm
	sharedscripts
	postrotate
		if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
			/etc/init.d/apache2 reload > /dev/null
		fi
	endscript
}
  • /etc/logrotate.d/tomcat6
/var/log/tomcat6/catalina.out { 
	copytruncate 
	daily 
	rotate 7 
	compress 
	missingok 
	size 5M 
}
 
 
repo/logrotate.txt ยท Last modified: 2012/07/27 16:47 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki