formats

Log POST data in Apache






Apache can log all POST data for troubleshooting purposes. I’ll show you how to set this up!


First you will need to enabled mod_dumpio.

On Ubuntu / Debian enable the module:

$ sudo a2enmod dump_io



Then add the following and restart apache:

$ sudo nano /etc/apache2/apache2.conf



LogLevel debug
DumpIOInput On
DumpIOOutput On
DumpIOLogLevel debug # optional - Apache 2.2.4 or later only




Red Hat / CentOS:

$ sudo nano /etc/httpd/conf/httpd.conf



Add the following:

LoadModule dumpio_module modules/mod_dumpio.so

LogLevel debug
DumpIOInput On
DumpIOOutput On
DumpIOLogLevel debug # optional - Apache 2.2.4 or later only




The POST data is then logged to the error_log for Apache. /var/log/httpd/error_log (Red Hat) or /var/log/apache2/error.log (Debian).


Be careful as logs will grow to be very huge in size! Only use this to debug special case scenarios.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home linux Log POST data in Apache