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.confPerlRequire /var/www/html/Sample/startup.plPerlModule Sample::AuthCookieHandlerPerlSetVar SamplePath /PerlSetVar SampleLoginScript /login.plPerlSetVar AuthCookieDebug 3<Location /protected>AuthType Sample::AuthCookieHandlerAuthName SamplePerlAuthenHandler Sample::AuthCookieHandler->authenticatePerlAuthzHandler Sample::AuthCookieHandler->authorizerequire valid-user</Location><FilesMatch "\.pl$">SetHandler perl-scriptPerlResponseHandler ModPerl::RegistryOptions +ExecCGIAuthType Sample::AuthCookieHandlerAuthName Sample</FilesMatch># This is the action of the login.pl script above.<Files LOGIN>AuthType Sample::AuthCookieHandlerAuthName SampleSetHandler perl-scriptPerlResponseHandler Sample::AuthCookieHandler->login</Files>ProxyRequests OffProxyPass /protected http://192.168.1.3:9999
ProxyPassReverse /protected http://192.168.1.3:9999I want to do something likeProxyPassReverse /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,AtanuOn Wed, May 27, 2009 at 4:56 PM, Atanu <atanu.das@xxxxxxxxx> 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 <nick@xxxxxxxxxxxx> wrote:
This is all fairly standard, and you probably don't really need mod_perl.
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.
Since you're using mod_perl, it would be fairly painless to
I want the mod_proxy to ProxyPass to the url in the following format
http://bar.com/bar.pl?sid=APACHE_SESSION&u=UserName
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-unsubscribe@xxxxxxxxxxxxxxxx
" from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx