Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

Apache Log files not Updated


Dear Experts,

I have apache with some virtual web pages.  I noticed that some of these web pages log files don't get updated somtimes.  I'm not when and how.

Your help is appreciated.
0
u4
Asked:
u4
1 Solution
 
ahoffmannCommented:
how do you know that they are not updated?
0
 
u4Author Commented:

I was going into some of these files to see who is visiting my web pages and asking for which files, and I noticed once that it should have logged myself since I just viewed the page and it did not do so.  Then I on purpose browsed the page again and then no logging.  As if the logging stopped at certain time while the web server is up and running.  at other times I would find that it is logging and sometimes it stops logging, then it goes back to logging at certain point, I'm not sure when, why and/or how.

I know this sounds strange but it is what I'm getting.
0
 
interiotCommented:
I've gotten the same thing before.  They way I knew is I was had tcpdump running, logging all incoming SYN packets and all outgoing SYN.ack packets.  Tcpdump was reporting www connections being made, but apache was not.

(This was on the evening of the Code Red Worm attacks, BTW)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
tdaoudCommented:

Do you edit the logfiles by hand?  Do you save if you edit your log files in an editor say "vi"?

If you edit any of your logfiles by hand and save afterwards, Apache will stop logging to that file (I'm not sure why....it maybe a security related feature that I don't know about).

I found out that since I moved to RedHat 7.1 that comes with it Apache 1.3.19

In the past I sometimes would edit my logfiles to remove certain logs that I made while testing my web page.  It used to continue logging afterwards, but now with apache 1.3.19, it is not doing the same anymore, and I have to restart httpd everytime I do edit a logfile...but I stopped editing such logfiles for the sake of it.  If I ever do, I will remember to restart httpd.

Hope that helps explain your problem if it is similar to what I faced.

Good Luck,

Tarik
0
 
ahoffmannCommented:
logging is delayed, usually. Means that the file will be flushed to disk every 8kb or so. So you do not see the messages immedeately, but if the (8k) buffer is flushed.
(the size of the buffer depends on kernel settings)
0
 
u4Author Commented:

Thanks a lot.

After several testing, that is exactly what I'm doing wrong.  I noticed on several tests that if I edit one of the logfiles and do a save in the editor, it stops logging to that file while other logfiles are still updated.

Abe
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now