[mod_python] Problem with config

Jorey Bump list+mod_python at joreybump.com
Wed Apr 14 10:23:35 EST 2004


Jimmie Houchin wrote:

> What I discovered.
>  From a previous try several months ago I had a python directory at 
> /var/www/htdocs/python which is in Apaches doc path.
[snip]
> When I changed the directive <Directory /var/www/htdocs/python>
> everything worked.
> 
> It isn't a problem putting everything into /var/www/htdocs/python but I 
> wish I understood what I did wrong and why /var/www/python failed. Hmm?

Unless you use an Alias, the files you access via apache have to fall 
under the DocumentRoot of your host.

If you still want to separate your python files from your other pages, 
add this line to httpd.conf:

  Alias /python/ "/var/www/python/"

Then you will be able to use the directive <Directory /var/www/python> 
and access it via http://localhost/python/mptest.py.



More information about the Mod_python mailing list