[mod_python] PythonHandler in <Location> works until I add a PythonAuthenHandler, then apache tries to serve req as physical file in htdocs?

perry.tew at cibavision.novartis.com perry.tew at cibavision.novartis.com
Tue Oct 7 00:33:07 EST 2003


Hello,
   I'm having a issue using both a PythonAuthenHandler and PythonHandler 
in the same <Location> directive.

The PythonAuthenHandler works when used within a <Directory /www/cgi-bin/> 
directive.
The PythonHandler works with a <Location> directive

However, when I add the Authen handler to the <Location> directive, my 
python handler is no longer called, instead, I receive a 404 stating that 
my uri was mapped to the htdocs directory and could not be found.   Allow 
me to illustrate:

<Location /manager>
        SetHandler python-program
        PythonHandler TicketManager
</Location>

The above works fine.  My python script is located in my PythonPath under 
the site-packages directory and is named TicketManager.py.

However, this doesn't work:
<Location /manager>
        SetHandler python-program
        PythonHandler TicketManager

        PythonAuthenHandler TicketAuthenHandler
        require valid-user
</Location>

Instead of seeing the output of my python script, I receive a 404 error 
and the following is displayed in my error_log:
[Tue Oct 07 00:13:59 2003] [error] [client 170.60.46.224] File does not 
exist: /web/devel/tewpe1/py/apache2/htdocs/manager

Again, the authen handler works when protecting a physical directory. Does 
anyone have any insight to this?  I know the security directives seem a 
little bare bones, but I'm not using Basic Auth, I'm using SSL Client 
Certs.  However, it does work.  My authen handler returns apache.OK. 

I also have a CleanupHandler defined (but not shown) and that is 
executing.


Thanks for your  time,
Perry Tew




More information about the Mod_python mailing list