[Chugalug] OT maybe, python and apache

Garrett Gaston garrett85 at hotmail.com
Tue Nov 13 16:21:38 UTC 2012

I'M trying to get the below python cgi output to load in my web browser 
but the browser is just displaying the code it's self instead of the 
output. My apache program is working because I just tried the phpinfo 
function and it worked just fine. I'M getting this code from a book and 
it's actually showing "#!/usr/bin/env python" but I decided to use what I
 got with the which command "which python3" -> /usr/bin/python3

I have one copy of the file in /var/www and another in /var/www/cgi-bin.
 I've also used grep and vi to find and edit every file in /etc/apache2 
that contains "ExecCGI' and I've removed that # in front of it hoping to
 turn on apache's cgi function. Could someone please tell me what I've 
done wrong here? Thanks.

<file is simple1.cgi>

print('Content-type: text/plain')
# prints an empty line, to end the headers
print('Testing Python CGI')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://chugalug.org/pipermail/chugalug/attachments/20121113/b9248b8c/attachment.html>

More information about the Chugalug mailing list