Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!


Sponsored Content

 

 
 

Photo
- - - - -

Log File Format


  • Please log in to reply
3 replies to this topic

#1 Craig B

Craig B

    HR 4

  • Active Members
  • PipPipPipPip
  • 215 posts
  • Location:Calgary, Alberta, Canada

Posted 07 October 2003 - 05:26 PM

Hello,

I have a web server and I find that I do not get some information I would like such as when the search engines visit my website (ie. googlebot).

Here is my access log configuration in /etc/httpd/conf/httpd.conf

# Need to fix  this
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/httpd/access_log common

Does anyone here have an example that works properly? if so, I would love to see it. :propeller:

thanks,
Craig.

#2 Tom Philo

Tom Philo

    Photographer

  • Active Members
  • PipPipPipPipPip
  • 507 posts
  • Location:Beaverton, Oregon

Posted 07 October 2003 - 06:01 PM

From that format it looks as if you are using Apache as a web server.

I am no Apache expert but when I talked to our UNIX person concerning this type of log file (one of our servers is Apache and I run reports using the logs) he stated that what is recorded varies with the version of Apache being run in customization of what the log files capture.

By default they capture the bare minimum and the information you want is just not captured.

Seems like a different version of Apache is needed or you need to spend a few score hours looking over the Internet to find out how to customize the logging of Apache web server.

Tom

#3 Ron Carnell

Ron Carnell

    HR 6

  • Moderator
  • 959 posts
  • Location:Michigan USA

Posted 07 October 2003 - 07:43 PM

There a ton of things that could potentially cause a problem, and yea, an older version of Apache could be one of them. If the server is the one in your signature, though, that's not likely (that site is running under Apache 1.3.24, which is a couple years old, I think, but not too bad).

Fortunately, we don't have to dig too deeply, because your problem is actually pretty obvious.

Each of the LogFormat directives in your httpd.conf is defining a different format that is available to you. Those formats are named, specifically combined, common, referer, and agent. Your CustomLog directive tells Apache WHICH of those four to actually use. And, uh, it isn't the one you want. :)

Change "common" to "combined" in the CustomLog directive and you should be good to go. For one cycle, your log files are going to be mixed with two different formats, which is another way of saying they'll be pretty much useless. You can either wait one cycle before trying to use them or, better yet, investigate how log_rotate is implemented on your configuration (probably in crontab). Worst case, the next time the system rotates your logs, you'll be where you want to be.

#4 Craig B

Craig B

    HR 4

  • Active Members
  • PipPipPipPip
  • 215 posts
  • Location:Calgary, Alberta, Canada

Posted 08 October 2003 - 11:04 PM

Thank you for posting a solution to the problem that has been a thorn in my side for awhile. So, if I understand correctly, my logs may be out of sync for a bit but will eventually return to normal?

thanks again!

-Craig




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users