Categories
programming

Raw data dumping in apache

There are times when you’re interested in seeing ALL the data served and received by an Apache server. Fortunately there exists an apache module that provides this functionality. It’s called dumpio.

The steps to use it:

  • Install dump_io module

    sudo a2enmod dump_io

  • Configure apache. Edit your apache2.conf file with the following (add if not present):
  • # Dump all data received
    DumpIOInput On
    # Level of dumping
    DumpIOLogLevel debug
    # Dump all output
    DumpIOOutput On

  • Restart apache

    sudo /etc/init.d/apache2 restart

Now you can see all the raw data in the error.log file:

[Sat Oct 28 10:52:31 2012] [debug] mod_dumpio.c(103): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Sat Oct 28 10:52:31 2012] [debug] mod_dumpio.c(51): mod_dumpio: dumpio_in (data-HEAP): 16 bytes
[Sat Oct 28 10:52:31 2012] [debug] mod_dumpio.c(67): mod_dumpio: dumpio_in (data-HEAP): GET / HTTP/1.1\r\n
[Sat Oct 28 10:52:31 2012] [debug] mod_dumpio.c(103): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Sat Oct 28 10:52:31 2012] [debug] mod_dumpio.c(51): mod_dumpio: dumpio_in (data-HEAP): 13 bytes

Photo: flickr

Leave a Reply

Your email address will not be published.