Small and lightweight Apache module to log POST data of a HTTP request
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore add files Dec 8, 2012
LICENSE add LICENSE Dec 9, 2012
Makefile Merge partially pull request #5 Nov 9, 2013 Fix outdated Markdown May 1, 2018
mod_dumpost.c issue_14_fix Aug 9, 2016
mod_dumpost.h issue_14_fix Aug 9, 2016


Small apache module to log body content of request (POST / FORM data). Data are written to error log by default. For example:

[Sat Dec 08 09:58:24 2012] [info] [client] ------------------------------4bc4ed022729\r\nContent-Disposition: form-data; name="f"; filename="poc.html"\r\nContent-Type: text/html\r\n\r\n
[Sat Dec 08 09:58:43 2012] [info] [client] a=100

Note: You can do the same with mod_security, use this when you want a quick and lightweight solution.


make install


In httpd.conf (optional):

  • DumpPostMaxSize 1024: limit the size of a log entry to 1024 bytes (default value: 1048576 i.e. 1MB)
  • DumpPostHeaderAdd Cookie Content-Type: add HTTP Header to log together with POST (default value: None)
  • DumpPostLogFile: specify a custom file to write the log entry (other than error log)


  • apxs:
    • Ubuntu: sudo apt-get install apache2-threaded-dev, edit Makefile change apxs to apxs2
  • LogLevel of at least Info (not important if using DumpPostLogFile)