Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-12-2012, 04:09 PM   PM User | #1
timgolding
Senior Coder

 
timgolding's Avatar
 
Join Date: Aug 2006
Location: Southampton
Posts: 1,460
Thanks: 89
Thanked 110 Times in 109 Posts
timgolding is on a distinguished road
Log rotation

When i set up my server i thought i had set up log rotation on my apache logs. I went to use my apache logs because i needed some data from it and found that the log i wanted to rotate was 6GB. There are other logs in there that are being rotated but only for one of my domains.

i tried to set up all domains to write logs to
/var/log/apache2/access_log

but this file /var/log/apache2/access_log is 6GB then the domain that rotates the logs has created other files with extra numbers at the end. such as
access_log.1342051200

I want all domains to log to the same file without the numbers. Then i want to rotate that log

The virtual host that does the rotation on wrong file:
Code:
CustomLog '|/usr/sbin/rotatelogs "/var/log/apache2/access_log" 604800 0' "%h %v %l %u %t \"%r\" %>s %b"
The domains that write to correct log but dont rotate
Code:
CustomLog "/var/log/apache2/access_log" "%h %v %l %u %t \"%r\" %>s %b"
I just want all domains to write to plain old access_log and that to be rotated?
Also would the first rotation be a bad idea on the 6GB file as it zips it?
__________________
You can not say you know how to do something, until you can teach it to someone else.
timgolding is offline   Reply With Quote
Reply

Bookmarks

Tags
log rotation

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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


All times are GMT +1. The time now is 10:38 PM.


Advertisement
Log in to turn off these ads.