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

I have a really simple Python script which I'd like to run on my Apache 2 server:


print "Content-Type: text/html"

print "<html><head><title>Hello</title></head><body></body></html>"

How can I simply get this up and going on my Apache server? I'm not looking to do anything fancy, I just want something that works.

share|improve this question
You forgot the ' World' after 'Hello'. It isn't official unless it is "Hello World". – Zoredache Oct 28 '11 at 7:41
If only it were that easy. – Naftuli Tzvi Kay Oct 28 '11 at 19:28
up vote 3 down vote accepted

That's a CGI script. Enable CGI on the server, call the script, put it in the cgi-bin/ directory, and go to http://somehost.ex/cgi-bin/

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.