User Tools

Site Tools


apache:troubleshooting:debugging_requests_and_responses

Apache - Troubleshooting - Debugging requests and responses

There are times when a problem can be caused by an application server, proxy server or the web server itself.

To dump HTTP requests and responses, the mod_dumpio Apache web server module can be used.

  • Tt allows HTTP requests and/or HTTP responses to be written to the error_log.

Setting up mod_dumpio is simple and straight forward.

  • To dump HTTP requests to the error_log, the DumpIOInput directive can be set to On.
  • To dump HTTP responses to the error_log, the DumpIOOutput directive can be set to On.

Once these directives are enabled, entries similar to the following will be written to the error_log each time a request is received, or a response is sent:

[Mon Oct 12 12:13:14 2016] [debug] mod_dumpio.c(103): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Mon Oct 12 12:13:14 2016] [debug] mod_dumpio.c(51): mod_dumpio:  dumpio_in (data-HEAP): 16 bytes
[Mon Oct 12 12:13:14 2016] [debug] mod_dumpio.c(67): mod_dumpio:  dumpio_in (data-HEAP): GET / HTTP/1.1rn

NOTE: mod_dumpio adds some additional overhead to request processing, and the configuration directives will require a server restart.

A graceful restart can be used to avoid killing active connections.

apache/troubleshooting/debugging_requests_and_responses.txt · Last modified: 2021/02/02 09:52 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki