I am seeing an intermittent issues where the user request is not getting thru to the backend server which is weblogic directed from apache webserver. I would llike to see the request value in apache before redirection to weblogic. How do I see the user request values in apache?
2 Answers
If I understand your question correctly, you are looking to log the entire http request from a client as it is received by Apache. There are a number of approaches to this issue:
You can use a tool like
tcpdump
to take a packet trace, and then usestrings
to extract the text content of the packets. That would look something like this:Grab the packets:
# tcpdump -w packets -s 1500 port 80 and host <client ip address>
Display the results:
# strings packets
This isn't a perfect method (the output of
strings
will contain some garbage), but it's usually a good start.According to Google, recent versions of Apache have mod_dumpio, which "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."
I believe that mod_security can also log full requests.
You can use:
- a sniffer:
ngrep 'GET|POST' port 80
- a tracer:
strace <apache_worker>
,ltrace <apache_worker>
- configure apache logs to log the content. Try to log only GETs.