Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm testing a flash app and need to log every HTTP post request it makes so I need to be able. My default setting is to use squid. What can I do?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

On your server, run:

$ tcpdump -w ~/capture.log -s 0 port 80

That will capture all traffic on port 80 and log it to capture.log in your home directory. After starting this command, perform whatever actions you are testing, and then Ctrl-C to stop the capture. When complete, you can use either tcpdump or preferrably the GUI program Wireshark to inspect and analyze the capture.

share|improve this answer

You are testing your app. So, you don't need to keep the logs for a long time.

1- You can use tcpump/wireshark to sniff HTTP traffic. You will have access to all traffic.

2- You can install an add-on for your browser (like firefox) to show you the posted data.

share|improve this answer
    
I just want to log the HTTP requests though. –  Stewart Robinson Nov 4 '10 at 12:06
    
Stewart: Khaled is nudging you to right direction. The thing is that POST requests do not usually get logged. Ok, they are logged, it's only that their parameters are missing from the logs, since the parameters are not visible in the URI. :-) So your possibilities are 1) modify the application to log all the POST parameters or 2) Use tcpdump/wireshark or a web browser add-on. –  Janne Pikkarainen Nov 4 '10 at 13:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.