
28th June 2009, 03:07
|
|
Member
|
|
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 46
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
Apache log rotation not configured in ISPConfig 3?
I've just realized that my webserver logs were piling up in the tens of gigabytes. I have checked the logrotate.d config for apache, but it is not configured for the log files in /var/log/ispconfig/httpd/, it only handles the default apache2 log directory, which is empty:
Code:
root@ispconfig:/etc/logrotate.d# cat apache2
/var/log/apache2/*.log {
weekly
missingok
rotate 52
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
}
Furthermore, there is no trace of logrotate in the cron folders or crontab.
Is ISPConfig able to handle log rotation, or should I configure this myself, separately?
Logrotate.d seems to pose a problem, as I would have to add every site to it manually, as ISPConfig keeps the log files in separate folders.
Last edited by gkovacs; 28th June 2009 at 03:12.
|

28th June 2009, 10:57
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,896
Thanks: 693
Thanked 4,191 Times in 3,207 Posts
|
|
ISPConfig handles the logfile rotation, so do not use logrotate as it will conflict with ISPConfig.
The logfiles are cromresssed after one day and removed after 30 days. See the script /usr/local/ispconfig/server/cron_daily.php for details.
|

28th June 2009, 14:30
|
|
Member
|
|
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 46
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
Till, how is it possible that I had just over 5 months of logs, none of it deleted or compressed? We are running ISPConfig 3.0.1 currently.
The script you mentioned is not in crontab nor is it visible in /etc/cron.daily. Should I copy/link it over?
Last edited by gkovacs; 28th June 2009 at 14:35.
|

28th June 2009, 14:33
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,896
Thanks: 693
Thanked 4,191 Times in 3,207 Posts
|
|
There was a bug ion older release regarding log rotation. You should update your system regularily. The cuurent version is 3.0.1.3.
|

29th June 2009, 00:40
|
|
Member
|
|
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 46
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
Second try
I have updated my ISPConfig to the latest version, but there is still no log rotation script (or anything connected to ISPConfig whatsoever) in the cron.daily folder or in /etc/crontab.
Here is the install script output:
Code:
Operating System: Debian Lenny/Sid or compatible
This application will update ISPConfig 3 on your server.
MySQL root password []: xxxxxxxxxxxxxxxx
Reconfigure Services? (yes,no) [yes]: no
Updating ISPConfig
ISPConfig Port [8080]:
chown: invalid user: `getmail'
Reconfigure Crontab? (yes,no) [yes]: yes
Updating Crontab
Update finished.
Do I need to reconfigure all services to enable the log rotation?
|

29th June 2009, 08:41
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,896
Thanks: 693
Thanked 4,191 Times in 3,207 Posts
|
|
Quote:
|
I have updated my ISPConfig to the latest version, but there is still no log rotation script (or anything connected to ISPConfig whatsoever) in the cron.daily folder or in /etc/crontab.
|
Please red my post above. I did not talk about the cron daily folder and I posted you the exact location of the script which does the log rotation and all other nightly tasks.
|

29th June 2009, 13:58
|
|
Member
|
|
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 46
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by till
Please red my post above. I did not talk about the cron daily folder and I posted you the exact location of the script which does the log rotation and all other nightly tasks.
|
Ok, but how does it run if not from cron? How can I set the time it runs, so it would not interfere with my other nightly tasks on the server?
By the way nothing happened last night. Log files are still there, none is compressed or deleted.
|

29th June 2009, 14:04
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,896
Thanks: 693
Thanked 4,191 Times in 3,207 Posts
|
|
As root user run:
crontab -l
to get a list of the ispconfig cronjobs.
Quote:
|
By the way nothing happened last night. Log files are still there, none is compressed or deleted.
|
The script compresses just the file which is one day old and deletes the file which is one month old. You will have to delete other files manually that are left on your server.
|

2nd July 2009, 05:59
|
|
Member
|
|
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 46
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
still no luck
Quote:
Originally Posted by till
The script compresses just the file which is one day old and deletes the file which is one month old. You will have to delete other files manually that are left on your server.
|
Well, I let it run for 2 days but nothing happened. The cron job is there, the script runs according to syslog, but it just doesn't compress the day old file and doesn't delete the month old one. Checked at several different sites, with log folders both empty and full with hundreds of files.
/var/log/ispconfig/cron.log shows nothing relevant.
What may be wrong? Any ideas how to nail the problem down?
|

2nd July 2009, 08:12
|
|
Junior Member
|
|
Join Date: May 2007
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
why error.log don't rotate like access.log?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 22:47.
|
Recent comments
13 hours 35 min ago
23 hours 3 min ago
23 hours 52 min ago
1 day 3 hours ago
1 day 7 hours ago
1 day 8 hours ago
1 day 10 hours ago
1 day 20 hours ago
2 days 1 hour ago
2 days 2 hours ago