Apache and Python and Ubuntu
I've create an Ubuntu Linux box, which comes pre-installed with Python (I've added the libapache2-mod-python throught the app manager). I've created .cgi and .py simple programs in the www root of apache. The problem is the programs just dump the contents to the browser in plain text. Or, in the case of the .py files, I am prompted to download the .py file. How can I get apache to recognize that it should execute the .cgi script? Is there any special thing I need to do to apache to get it to know that the python interpreter should be used for all .cgi files? Thanx all for your help in advance! pen -- http://mail.python.org/mailman/listinfo/python-list
Re: Apache and Python and Ubuntu
Thanx a lot for your input and advice. I went through the documentation on httpd.apache.org/docs/2.2/howto/cgi.html and added the following: AddModule cgi-script .cgi .py Options +ExecCGI It now gives me a 403 forbidden. When I check the error logs, it still says that Options ExecCGI is not turned on in /var/www/ Is there a special place inside of apache2.conf I'm supposed to have the tag? and/or AddModule line? I also double checked to make sure owner/group/other all have execute and it does. -- http://mail.python.org/mailman/listinfo/python-list
Re: Apache and Python and Ubuntu
Paul, thank you so much for your information and help! That was exactly the issue. I added ExecCGI and addHandler cgi-script .cgi to the sites-available/default file and bounce the service and it's working! Thanx again! -- http://mail.python.org/mailman/listinfo/python-list