Q. How do I log POST data submitted by our user registration form to a log file under Debian Linux Apache 2 Web Server?
A. You can use mod_security or mod_dumpio module under Apache web server to dump POST data.
Apache mod_dumpio Module
This module allows for the logging of all input received by Apache and/or all output sent by Apache to be logged / dumped to the error.log file.
WARNING! These examples requires apache version 2.1.3 or above along with mod_dumpioStep # 1: Enable mod_dumpio module
Type the following command as the root user:
$ sudo a2enmod dump_io
OR
# a2enmod dump_io
Restart Apache Web server:
# /etc/init.d/apache2 force-reload
Step # 2: Configuration
Open httpd.conf or apache2.conf file:
# vi apache2.conf
Enable dumping of all input data:
DumpIOInput On
Enable dumping of all output at a specific LogLevel level such as notice or debug:
DumpIOLogLevel debug
If you want to enable dumping of all output, enter:
DumpIOOutput On
Save and close the file. Just restart Apache2:
# /etc/init.d/apache2 restart
How do I view logs?
All data is logged to error log file,
# tail -f /var/log/apache2/error.log
OR
# egrep -iw 'one|two' /var/log/apache2/error.log
Further readings:
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 7 comments… read them below or add one }
From where can I download the module mod_dumpio ?
Apache website or search any rpm / debian repo for a package. It is part of many distro.
Thankyou for the information. I would be very greatful if you could help me. My problem is
‘ i want to configure my apache server to get the response time of the server. for that which file should i edit? HOW????
An alternative to mod_dumpio would be mod_log_post, also doing a well job for me. It works with any Apache 2.x version, thus not dependent on Apache 2.1.3 or later.
I’ve enabled this but I’ve setup custom error logs for all my websites. I’ve looked in both the access and error logs and the dumping of post variables is nowhere to be seen.
Hello Max,
I am trying to log POST request data into log files. I am working on Windows XP. Can you tell me if mod_log_post is available for windows?
Thanks for your help.
Regards,
- Sachin Jain
If somebody really helps me, I could imagine to build and maintain my mod_log_post module for Windows systems. So if you’ve too much free time and real build experience with Windows systems and especially Apache modules, simply contact the mod_log_post upstream.