How to get .cgi files working in python with Apache on Ubuntu

Posted by tapan on Super User See other posts from Super User or by tapan
Published on 2011-02-11T07:02:44Z Indexed on 2011/02/11 7:27 UTC
Read the original article Hit count: 554

Filed under:
|
|

I am not really sure whether to post this here or on SO. I think this has more to do with server administration so i am posting it here. I have apache 2.2 installed on my ubuntu 10.10 system with libapache2-mod-python. However when i put a .cgi file with python in it in my apache root (/var/www) it doesn't get executed and all i see is the script i have written. For example this should show the text "Test":

#!/usr/bin/python
print "Test"

However the above script shows up in my browser. Any idea what conf files,etc. i'll have to go through and change to allow this to work ? (the file perms on test.cgi is 755 if that makes a difference.)

© Super User or respective owner

Related posts about ubuntu

Related posts about apache