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

what do I need to run python on my webserver ?

Should I enable some Apache module ?


share|improve this question
up vote 4 down vote accepted

Make sure you also look at mod_wsgi. It's a nice alternative to running mod_python. Also, depending on your application, FastCGI is also an option (see packages like flup, which kind of acts as a bridge between FastCGI & WSGI).

share|improve this answer
+1 mod_wsgi is the preferred way of doing it these days. – David Z May 20 '10 at 19:40

Yea, you need mod_python.

Or you can enable cgi support by putting in a AddHandler cgi-script .py directive in your httpd.conf...You'll need to put a cgi shebang on the first line of your script as well (i.e. !#/usr/bin/python).

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.