Executing a Python script in Apache2
I am trying to execute a Python program using Apache. However, Apache will only serve the file and not actually execute it. The permissions on the file are r/w/x and it is in /var/www . I will post the contents of httpd.conf and the program code after. I also tried to running the python script as a .cgi file but that did not work as well. I have both the mod_python and mod_wsgi modules loaded into apache as well. Python sample: #!/usr/bin/python # enable debugging import cgitb cgitb.enable() print "Content-Type: text/plain\r\n\r\n" print print "Hello World!" httpd.conf: AddHandler cgi-script