This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes Logging HTTP header info using Apache HTTP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Logging HTTP header info using Apache HTTP" Watch "Logging HTTP header info using Apache HTTP" New topic
Author

Logging HTTP header info using Apache HTTP

S Venkatesh
Ranch Hand

Joined: Jun 27, 2005
Posts: 464

Hi All,

How do i log the HTTP Header info that the Apache HTTP Server recevies from the client? I am currently using Apache HTTP 2.0.59 version.

Thanks
Venkatesh S
Stu Thompson
Hooplehead
Ranch Hand

Joined: Jun 14, 2006
Posts: 136
You are probably using the predefined common or combined log file format at the moment. You could do a custom format by selecting the fields you are interested in from http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats

Many of the loggable headers are predefined (%...h is Remote host, %...H is request protocol, etc.) but you can get other headers out with %...{Foobar}i (where {Foobar} is your header name) log format entries.

Follow the instructions for mod'ing your httpd.conf here: http://httpd.apache.org/docs/2.0/logs.html


"This is not to say that design is unnecessary. But after a certain point, design is just speculation." --Philip Chu
S Venkatesh
Ranch Hand

Joined: Jun 27, 2005
Posts: 464

Thank you very much !! i was searching for the same
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logging HTTP header info using Apache HTTP