faqts : Computers : Programming : Languages : Python : Common Problems : Web Programming

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

42 of 80 people (53%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How do I configure Apache to serve Python CGI scripts?
How do I install Python as as Apache scripting language?

Mar 10th, 2000 11:09
Steve Holden, Patrick Phalen


Add this to the appropriate section of srm.conf (or httpd.conf,
if you follow the new single-file fad).
    AddHandler cgi-script .py
Alternatively, if you don't want to advertise to the sociopathic
crackers of the world what your CGI scripts were written in, just use:
    AddHandler cgi-script .cgi
and change the script file names to have the cgi extension.
You can also use the PyApache module which integrates Python
rather more closely with Apache, but that is beyond the scope
of this article.