Forum Moderators: DixonJones

Message Too Old, No Replies

Logging POST data with Apache

Can you configure Apache to log POST variables?

         

jm_uk

11:38 am on Dec 16, 2002 (gmt 0)

10+ Year Member



For a particular project I am working on I am using the web server's log files for analysis. However, there are a couple of applications on the site that we need to use POST for rather than GET to send variables. The problem with this is that the query string variables for POST requests are not logged in access log as they are when you use GET.

Does anyone know of a way to get Apache to log POST variables?

sugarkane

12:12 pm on Dec 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm really not sure there is a way, aside from using the Scriptlog directive [httpd.apache.org] in mod_cgi (but this is meant for debugging only, and I'm not sure if it logs everything or just errors).

Maybe you could modify your applications to produce their own logs of parameters passed to them?

jm_uk

12:38 pm on Dec 16, 2002 (gmt 0)

10+ Year Member



Ideally, I'd like to get all of the data in the web logs to keep analysis as straightforward as possible.

The reason for the question is that I've seen iPlanet/NES NSAPI code the will allow iPlanet/NES to log POST so I was wondering if some bright spark had done something similar for Apache.

seindal

12:42 pm on Dec 16, 2002 (gmt 0)

10+ Year Member



If your programs run as cgi, ScriptLog should be able to log POST request data too, but not if you use mod_perl or similar.

The problem with logging post data is that they can be very large, up to many Mb. Uploaded files come in as POST data, for example. Would it be appropriate to log every bit of a multi-Mb upload?

René.