[mod_python] Directory or Location?

Stefan Kanitz sk at medien.fh-wiesbaden.de
Thu Jun 12 08:26:04 EST 2003


Am Donnerstag, 12. Juni 2003 07:50 schrieb Timothy M. Brauch:
> <Directory /some/directory/htdocs/test>
>   AddHandler python-program .py
>   PythonHandler mptest
>   PythonDebug On
> </Directory>
>
> in the python.conf file.  However, in the default python.conf file that was
> installed with the mod_python 3.0.0-10 rpm, the examples say
>

I think, when the mod_python documentation talks about "main server 
configuration file", it means httpd.conf (Apache configuration file) and not 
python.conf.

Steve


> # This will cause files beneath /var/www/html with the extension .spam
> # to be handled by the Python script /var/www/html/eggs.py
> #
> #<Directory /var/www/html>
> #    AddHandler python-program .spam
> #    PythonHandler eggs
> #</Directory>
> ...
> # This will cause all requests to the /python heirachy **<--note typo** of
> your
> # webserver to be handled by mod_python's Publisher handler
> # (see http://localhost/manual/mod/mod_python/hand-pub.html)
> #
> #<Location /python>
> #    SetHandler python-program
> #    PythonHandler mod_python.publisher
> #</Location>
>
>
> What is the difference between using "Location" and "Directory"?  When do I
> use each one?
>
> As I found out, there is a difference and if you use "Location" where you
> should use "Directory".  You get a 500 Internal Server Error that I never
> quite understood and spent some time trying to fix.  There doesn't seem to
> be anything in the documentation I've read to describe the difference
>
>  - Tim
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list