How can I enable logging for requests going through mod proxy

Solution 1:

I used dumpio. I put the following in /etc/httpd/conf.d/dumpio.conf:

LoadModule dumpio_module modules/mod_dumpio.so

DumpIOInput On
DumpIOOutput On
DumpIOLogLevel debug

LogLevel debug

An often forgotten piece is setting the LogLevel to debug. Without it, you won't actually see any DumpIO output.

The log output is written to the error log for the virtual host and/or the server.

Solution 2:

If you change LogLevel to debug it'll give you more detail about what's going on in the standard Error log.

LogLevel debug

That'll get you plenty of information about what's happening.


Solution 3:

You can also append proxy:trace5 to your existing LogLevel directive

If you have this

LogLevel error 

Change it to this

LogLevel error proxy:trace5

Be sure to change that back to normal after use. This will create huge log files fast.


Solution 4:

Another option might be mod_forensic, can easily log the request and headers etc. Beware of disk space usage though, on a heavy load web-site mod_forensic can easily produce tens of Gigs per day.

http://httpd.apache.org/docs/2.2/mod/mod_log_forensic.html