apachepostmodule

Apache/2.4.7 (Ubuntu) - mod_dumpio not logging post data


I can't seem to get the Apache module mod_dumpio to log anything.

I have tried the suggestions in this post

To be sure I have tried the following

  1. Disabled all of my vhosts except the one for the site I am working on

  2. Ran a2enmod dump_io, and restarted Apache, can see it in /etc/apache/mods-enabled/dump_io.load

  3. Check that /etc/apache/apache.conf LogLevel is dumpio:trace7 too

  4. I open the log tail -f n 20 /var/log/apache2/packager-access.log

  5. Run the following command to send some post data --data "param1=value1&param2=value2" http://packager.local/api/package/create

  6. Can only see lines like 127.0.0.1 - - [12/Nov/2014:10:07:04 +0000] "POST /api/package/create HTTP/1.1" 500 294 "-" "curl/7.35.0"

The vhost conf is as below

    <VirtualHost *:80>
        DocumentRoot /var/www/packager/web
        ServerName lms-packager.local

        ErrorLog ${APACHE_LOG_DIR}/packager-error.log
        CustomLog ${APACHE_LOG_DIR}/packager-access.log combined

        DumpIOInput On
        DumpIOOutput On
        LogLevel dumpio:trace7
    </VirtualHost>

Is there anything else that I could try


Solution

  • After reading this post, I tried to move the configuration to the server level.

    As the post suggests the key point from the Apache manual is

    server config This means that the directive may be used in the server configuration files (e.g., httpd.conf), but not within any or containers. It is not allowed in .htaccess files at all.

    The following is also important so only check your ErrorLog file (e.g. /var/log/apache2/error.log) rather than any vhost file which makes sense if this is a server config

    to be logged (dumped) to the error.log file