[mod_python] Problem installing mod_python

nm at estadias.com nm at estadias.com
Thu Dec 15 12:20:40 EST 2005


Hi,
My virtual host is:

<VirtualHost *>
    ServerAdmin xx at xxxx.com
    ServerName python.debian
    DocumentRoot /home/nm/public_html/python/
    ErrorLog logs/python.debian-error_log
    CustomLog logs/python.debian-access_log common
</VirtualHost>

In my /home/nm/public_html/python/.htaccess:

AllowOverride All
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On

My mptest.py:

from mod_python import apache

def handler(req):
    req.write("Hello World!")
    return apache.OK

Thats it.
Thanks

Quoting Roberto Sanchez <roberto at familiasanchez.net>:

> nm at estadias.com wrote:
> > Hi,
> > I'm new to python, and i have a problem with the mod_python installation.
> > I'm running Debian linux 3.1 STABLE, i've done an apt-get install
> > libapache2-mod-python.
> > I've tried to run the simple example of:
> > http://www.modpython.org/live/current/doc-html/inst-testing.html
> > But don't works. When i call the page, the browser simply show a window to
> save
> > the file.
> > In my apache2.conf i have:
> > <Directory /home/*/public_html>
> >         AllowOverride All
> >         Options Indexes SymLinksIfOwnerMatch IncludesNoExec
> > </Directory>
> >
> > Any ideas?
> > Thanks,
> > Nuno
>
> What are the contents of the .htaccess in ~/public_html/?  If you are
> not enabling the mod_python handler there, then is it in your server
> config or virtualhost config?  If so, what are you using?
>
> -Roberto
>
> --
> Roberto C. Sanchez
> http://familiasanchez.net/~roberto
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the Mod_python mailing list