My setup is Apache 2.x and mod_perl 2.x and AuthCookie(Apache-AuthCookie-3.12). I have been able to do a cookie based authentication with a (hardcoded) user-name and password (of course from the sample files and configurations) and on authentication success have been able to proxy the request to another URL.The question is how do I send the username and password parameters to the proxied URL?
My httpd.conf PerlRequire /var/www/html/Sample/startup.pl PerlModule Sample::AuthCookieHandler PerlSetVar SamplePath / PerlSetVar SampleLoginScript /login.pl PerlSetVar AuthCookieDebug 3 <Location /protected> AuthType Sample::AuthCookieHandler AuthName Sample PerlAuthenHandler Sample::AuthCookieHandler->authenticate PerlAuthzHandler Sample::AuthCookieHandler->authorize require valid-user </Location> <FilesMatch "\.pl$"> SetHandler perl-script PerlResponseHandler ModPerl::Registry Options +ExecCGI AuthType Sample::AuthCookieHandler AuthName Sample </FilesMatch> # This is the action of the login.pl script above. <Files LOGIN> AuthType Sample::AuthCookieHandler AuthName Sample SetHandler perl-script PerlResponseHandler Sample::AuthCookieHandler->login </Files> ProxyRequests Off ProxyPass /protected http://192.168.1.3:9999 ProxyPassReverse /protected http://192.168.1.3:9999 I want to do something like ProxyPassReverse /protected http://192.168.1.3:9999?username=<from input username>&password=<from input password> As suggested in the thread, it could be possible using mod_rewrite, but I am not able to get the rewrite rule to work in the first place. Please help. Thanks, Atanu On Wed, May 27, 2009 at 4:56 PM, Atanu <atanu....@gmail.com> wrote: > Thanks Nick for the pointer. Let me try this out in my boxes. > > > On Wed, May 27, 2009 at 4:09 AM, Nick Kew <n...@webthing.com> wrote: > >> >> On 26 May 2009, at 22:37, Atanu wrote: >> >> - The user will still type http://foo.com. This time a mod_proxy handler >>> will display a login page. In fact this my own authentication handler >>> written in mod_perl. It authenticates using a back end system by accepting >>> username and password from the login page. >>> >> >> This is all fairly standard, and you probably don't really need mod_perl. >> >> I want the mod_proxy to ProxyPass to the url in the following format >>> >>> http://bar.com/bar.pl?sid=APACHE_SESSION&u=UserName >>> >> >> Since you're using mod_perl, it would be fairly painless to >> append the query string in Perl. The alternative is to use >> RewriteRule with [P] in place of proxypass. >> >> -- >> Nick Kew >> >> --------------------------------------------------------------------- >> The official User-To-User support forum of the Apache HTTP Server Project. >> See <URL:http://httpd.apache.org/userslist.html> for more info. >> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >> " from the digest: users-digest-unsubscr...@httpd.apache.org >> For additional commands, e-mail: users-h...@httpd.apache.org >> >> >