Configure Apache to use Python just like CGI PHP
I think one commonly known way of adding PHP to an Apache webserver is to configure it like this: ScriptAlias /php5.3 /usr/local/php5.3/bin Action application/php5.3 /php5.3/php-cgi AddType application/php5.3 .php Now I tried to write a similar configuration for Python: ScriptAlias /python /usr/bin Action application/python /python/python AddType application/python .py I have a small test script that looks like this: print "Content-Type: text/html\n\n" print "Test" But something seems to be wrong since the apache error log says the following: Premature end of script headers: python So my first