geektron has asked for the wisdom of the Perl Monks concerning the following question:

I'm still banging my head against Apache::AuthCookie ... I got the login.pl to invoke, but when the SUBMIT button is pressed, i get a 404 for /LOGIN. that's *supposed* to be handled by mod_perl ... I yanked this straight out of the example again ... but I don' t know where to start tracking down *why* this isn't catching:
<Files LOGIN> AuthType TestCookie::AuthCookieHandler AuthName TestCookie SetHandler perl-script PerlHandler TestCookie::AuthCookieHandler->login </Files>
i also have this to add another dir to @INC
<Perl> use lib qw# /home/httpd/htdocs/libs #; </Perl>
i tried digging through the mod_perl docs online, but i didn't see anything that looked right ....

it's just one of those days

Replies are listed 'Best First'.
Re: Files directive in mod_perl config
by Juerd (Abbot) on Mar 08, 2004 at 20:54 UTC

    i get a 404 for /LOGIN (...) <Files LOGIN>

    IIRC, <Files> works only for existing files. Try using <Location> instead.

    Note that it is not mod_perl configuration but Apache configuration. I think your question is more or less off topic here.

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      That's correct, <Files> is for things like "*.pl", not for literal URLs.
        that's nice, but i guess the perldoc is f**ked for Apache::AuthCookie?

        a straight cut-n-paste from perldoc Apache::AuthCookie

        # This is the action of the login.pl script above. <Files LOGIN> AuthType Sample::AuthCookieHandler AuthName WhatEver SetHandler perl&#8208;script PerlHandler Sample::AuthCookieHandler&#8208;>login </Files>
        so ... i'm even *more* confused.
      OK, that starts to work ... now the cookie doesn't seem to get set correctly.

      but that also means that the docs are fubar. grrr.

      EDIT:after checking the error_log, the cookie is getting set with an expiration date in the past, which is obviously an invalid cookie...

      EDIT2:invalid cookie was invalid password. with the right password, i get:

      access to /home/httpd/htdocs/protected/index.html failed for 10.0.0.50 +, reason: file permissions deny server execution
      file permissions are OK ....
      [root@machine protected]# ls -al total 12 drwxr-xr-x 2 root root 4096 Mar 4 16:24 . drwxr-xr-x 4 root root 4096 Mar 8 10:31 .. -rw-r--r-- 1 root root 31 Mar 4 16:24 index.html
      the stupid Q: *what* file permissions?

      programming's hard. let's go shopping!

        Most likely that means that login.pl (or whatever you called your login script) is not executable.