I was trying to configure python to apache2 as suggested by http://ubuntuforums.org/showthread.php?t=91101
- First downloaded and installed and enabled
mod_python
module Changed
/etc/apache2/sites-available/default
as specified<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride AuthConfig Order allow,deny allow from all AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On # Uncomment this directive is you want to see apache2's # default start page (in /apache2-default) when you go to / #RedirectMatch ^/$ /apache2-default/ </Directory>
created
test.py
in my/var/www
and restarted apache.Getting
404-Not Found error
forlocalhost/test.py
On my
error.log
i have[Sun Apr 10 14:07:04 2011] [notice] mod_python (pid=5591, interpreter='localhost.localdomain'): Importing module '/var/www/test.py'
I am using Ubuntu-10.10
. Anyone any ideas ???
UPDATE
I think the folder is
/var/www
and NOT /www/var.Did you add:
As the first line in your python script? If not it won't be recognized as a python script.
Also try to disable the plugin and tell me if it outputs the contents of the file when you go to
localhost/test.py
.I hope this helped you, Daniel