[mod_python] Virtual documents and mod_python

Gregory Trubetskoy grisha at modpython.org
Thu Nov 2 17:50:27 EST 2000


It should work just fine. The only catch is that since <location>
directives have no physical path associated with them, you have to
make sure that your sripts are in PythonPath.

What problem are you having?

--
  Gregory (Grisha) Trubetskoy
       grisha at modpython.org

On Thu, 2 Nov 2000, John Posner wrote:

> Hi --
> 
> I've been successful using this technique to get a Python script to handle a
> standard HTTP request:
> 
> <Directory <Document Root>/python>
>   AddHandler python-program .py
>   PythonHandler test
>   PythonDebug on
> </Directory>
> 
> But I don't want or need to create an actual directory containing the Python
> script. I'd like to create a virtual document location:
> 
> <Location <Document Root>/py_xmlrpc>
>   SetHandler python-script
>   PythonHandler py_xmlrpc
> </Location>
> 
> I've used this technique successfully with Perl, but it doesn't work with
> Python. Apache thinks it's a request for a real document. And fooling around
> with relative/absolute specs as the Location parameter doesn't make any
> difference.
> 
> Can anyone help?
> 
> Tx,
> John
> 
> --
> John Posner, Editor           jjp at oreilly.com
> O'Reilly & Associates         860-663-3147
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 




More information about the Mod_python mailing list