Log POST data to file for debugging

Dave Barton dave.barton at comodo.com
Tue Aug 10 14:38:59 MSD 2010


Hi,

We have an issue with some software in the field which makes requests 
back to our webservers. We need to log the IP of each request, the 
referrer string and the POST data. Standard logs take care of the first 
two, but how can I write out the POST data as well?

Some research suggests that I can use the $request_body to grab this 
information, but I'm not sure when it's populated/flushed and also 
whether I can write out directly from nginx or whether I need a custom 
module.

I'm using nginx 0.7.64 on Gentoo (amd64) with 2.6.21-xen kernel.

Any help would be greatly appreciated :D

Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5860 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://nginx.org/pipermail/nginx/attachments/20100810/770d20a5/attachment.bin>


More information about the nginx mailing list