Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 28th June 2009, 03:07
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
Sponsored Links
  #2  
Old 28th June 2009, 10:57
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,567
Thanks: 791
Thanked 4,979 Times in 3,900 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 28th June 2009, 14:30
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #4  
Old 28th June 2009, 14:33
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,567
Thanks: 791
Thanked 4,979 Times in 3,900 Posts
Default

There was a bug ion older release regarding log rotation. You should update your system regularily. The cuurent version is 3.0.1.3.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 29th June 2009, 00:40
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default 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?
Reply With Quote
  #6  
Old 29th June 2009, 08:41
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,567
Thanks: 791
Thanked 4,979 Times in 3,900 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 29th June 2009, 13:58
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
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.
Reply With Quote
  #8  
Old 29th June 2009, 14:04
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,567
Thanks: 791
Thanked 4,979 Times in 3,900 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 2nd July 2009, 05:59
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default still no luck

Quote:
Originally Posted by till View Post
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?
Reply With Quote
  #10  
Old 2nd July 2009, 08:12
Alex1 Alex1 is offline
Junior Member
 
Join Date: May 2007
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

why error.log don't rotate like access.log?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't log me in the ISPConfig thaibinhtt Installation/Configuration 3 7th March 2009 15:16
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 14:31
CENTOS 5 Ping Problem gAnDo Server Operation 11 28th March 2008 20:58
Disable SSL on the ISPConfig Apache server lespaul49 Installation/Configuration 1 24th July 2007 14:15
SuseFirewall expert pls help zacch Installation/Configuration 11 17th March 2006 04:24


All times are GMT +2. The time now is 13:24.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.