my dog learned polymorphism*
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Similar Threads
Fetching Header information via JavaScript
Basic authentication soap header values?
who call the servlet?
How to reduce HTTP response Header info in apache 2.046
Apache HttpClient - Retry-After header