[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] Re: RaQ3 errors rotating httpd access log
- Subject: RE: [cobalt-users] Re: RaQ3 errors rotating httpd access log
- From: "Sim Ayers" <sim@xxxxxxxxxxxx>
- Date: Wed Jun 20 11:17:19 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hi all,
I had the same problem with the log files not rotating correctly,
so I wrote a script to:
1: copy the /var/log/httpd/access log file to new location (current working
directory)
2: delete the /var/log/httpd/access log file
3: creating a new /var/log/httpd/access log file using touch
4: reset the correct file permissions on the /var/log/httpd/access log file
5: restart the web server using '/etc/rc.d/init.d/httpd restart'
6: split-up the old access log file and append the info to each of the
sites on the server.
This script must be run as root, works on RQ3 and RQ4
You can download the script at:
http://www.perl-studio.com/cobalt/log_fix.txt
Upload the script to /home/sites/site1, chmod 755
login as root cd to /home/sites/site1
then type ./log_fix.cgi
Use at your own risk. The worst it can do is fix the log rotate problem,
and not append the access log hits to the virtual sites on your server.
However, it has worked correctly each time I've ran the script on our
RQ3 and RQ4.
Sim Ayers
http://www.perl-studio.com
-----Original Message-----
From: cobalt-users-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Step Firth
Sent: Wednesday, June 20, 2001 2:10 AM
To: cobalt-users@xxxxxxxxxxxxxxx
Subject: [cobalt-users] Re: RaQ3 errors rotating httpd access log
>
>> However, I have several days' worth of logs in the existing access
>> file. How can I salvage these logs and get the log to rotate?
>
> Paul,
> I've seen this covered but can't remember exactly what to search for.
> snip
> Wish I could remember what to look for - splitting logs, maybe?
>
> CarrieB
Hi.
I dug this thread out from the archives when I had to fix the problem.
http://list.cobalt.com/pipermail/cobalt-users/2000-September/021087.html
The script quoted further down the thread works a treat (once you build it
for your own data). I have run it three times now. The only problem is, all
the stats waiting in the log file seem to get distributed between the sites
fine, but as only one unique visitor. Small price to pay though.
Is there a fix to the actual log-rotate bugs yet? Have I missed it?
Step
_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To Subscribe or Unsubscribe, please go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users