LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Thread Tools
Old 08-26-2004, 12:51 AM   #1
pembo13
Member
 
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403
Thanked: 0
Moving Apache logs


[Log in to get rid of this advertisement]
Hello,

Strange thing has happened to my Apache logs. The log files i've specified for my vhosts are 0 sized, and the <log filename>.1 is the log active for all my vhosts that use logging. I know logroate is suppose to be in charge of any renumbering, but I was of the understading that the active log file left by logroate would not have a number appended to it.

Normally I would not consider this a problem, except for these two things:

1. I use the GUI redhat log viewing tool, and this requrest a static path to the log file
2. I use Awstats to mine data from my logs, and this also use a statis path.

I have made some change to the /etc/logroate.d/httpd config file, so as to make an entry so that it would allow Awstats to collect data pre-rotate. And so the httpd logrotate config file look slike this at current:
Code:
/var/log/httpd/*log {
    missingok
    notifempty
    sharedscripts
    prerotate
        /usr/local/awstats/tools/awstats_updateall.pl now
    endscript
    postrotate
        /bin/kill -USR1 `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}
How can I get my log naming back to normal?
pembo13 is offline     Reply With Quote
Old 08-26-2004, 04:46 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,036
Thanked: 0
My guess is that the httpd didn't receive a signal to restart with the new logs. Is the pid in:
/var/run/httpd.pid

correct?
david_ross is offline     Reply With Quote
Old 08-26-2004, 07:49 PM   #3
pembo13
Member
 
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403
Thanked: 0

Original Poster
You're a genius. But looking back, I guess I should have thought of that....Well, live and learn.

Just stopped and then started httpd to get it back to the correct file.

Thank you.
pembo13 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
About Apache Logs SiLiCoN Linux - Networking 1 05-26-2005 11:34 AM
rotate apache logs Berhanie Slackware 5 12-15-2004 10:36 PM
Apache Logs Valso Linux - Software 2 11-05-2004 04:13 PM
Apache 1.3 Web Logs jnovak_it Linux - Games 1 10-30-2003 04:29 PM
Apache logs - ???Linux logs??? mylo2003 Linux - General 3 08-07-2003 05:49 PM


All times are GMT -5. The time now is 12:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration