Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 11th, 2002, 09:29 AM
jon_whitcraft's Avatar
jon_whitcraft jon_whitcraft is offline
PHP Coder
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Indianapolis, IN, USA
Posts: 367 jon_whitcraft User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 28 m 34 sec
Reputation Power: 8
Send a message via Yahoo to jon_whitcraft
apache loging issues

I have ran into a problem with apache. It has been loging find for the past 2 months then last week when the logs rotated it stoped loging. All I did to fix it was restart apache. What would cause this problem. The httpd.conf file has not changed in 2 months. any help will be very appricated.

Thanks in advance.
__________________
Jon Whitcraft
Web Applications Developer :: Zend Certified Engineer
http://www.indianapolismotorspeedway.com/

Quote:
Originally said by Tyler Durden
Our fathers were our models for God. If our fathers bailed, what does that tell you about God? Listen to me. You have to consider the possibility that God does not like you. He never wanted you. In all probability, he hates you. It's not the worst thing that can happen to you. We don't need him. **** damnation, man. **** redemption. We are God's unwanted children, SO BE IT! First you have to give up. First, you have to know, not fear, that someday, you're gonna die. It's only after we've lost everything that we're free to do anything.

Reply With Quote
  #2  
Old February 11th, 2002, 09:51 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How do you rotate it? Keep in mind, whenever you moved or altered your log file by hand or via a script without sending a HUP signal to Apache, the inode will change and Apache will refuse to write to the new log file.

Reply With Quote
  #3  
Old February 11th, 2002, 10:16 AM
jon_whitcraft's Avatar
jon_whitcraft jon_whitcraft is offline
PHP Coder
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Indianapolis, IN, USA
Posts: 367 jon_whitcraft User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 28 m 34 sec
Reputation Power: 8
Send a message via Yahoo to jon_whitcraft
I use the logrotate program that came installed on the system. Should I modify the cron job to restart apache after it rotates the logs?

Reply With Quote
  #4  
Old February 11th, 2002, 10:27 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have never used logrotate so I can't help you on that. However, the terminology is the same. So make sure you don't alter, move or do anything (parsing is fine) to the log file while Apache is running. The next thing to look for is permission. It looks like Apache no longer has the permission to write to the new log file.

>> Should I modify the cron job to restart apache

You need to check logrotate manual. Though it's perfectly fine to send a graceful to apachectl via cronjob occasionally.

Reply With Quote
  #5  
Old February 13th, 2002, 08:58 AM
jon_whitcraft's Avatar
jon_whitcraft jon_whitcraft is offline
PHP Coder
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Indianapolis, IN, USA
Posts: 367 jon_whitcraft User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 28 m 34 sec
Reputation Power: 8
Send a message via Yahoo to jon_whitcraft
I am just wondering what you use to do the rotate your logs? do you use the log rotate feature of apache? if so how does that work?

Thanks in advance

Reply With Quote
  #6  
Old February 13th, 2002, 10:20 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I use newsyslog -> /etc/newsyslog.conf.
For example:
Code:
/var/log/apache/access_log	600	7	300	*	Z     /var/run/httpd.pid

- Rotate it when it reaches 300kb
- Keep 7 /var/log/apache/access_log.x.gz maximum (probably never reach it anyway because I use another mechanism to move xxx_log.x.gz files out of /var/log/ so I have a cleaner /var/log at all time)
- Chmod it 600
- Give Apache a HUP signal

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > apache loging issues


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT