Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I make apache echo the original request in the response body? Is CGI needed?


Nevermind, I wrote a simple web server in Perl :)

share|improve this question

If you are using php then you can use a snippet like this somewhere in your page

foreach($_SERVER as $k=>$v)  {
    print $k.': '.$v."<br />";
share|improve this answer
Unfortunately, I needed the request exactly as it was sent, and I'm not sure foreach on hashtable works that way :) – Alexei Averchenko Feb 6 '11 at 0:02

You'd most likely have to use some kind of scripting language like PHP to accept the request and echo out the headers and content of the request.

share|improve this answer

Your Answer


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.