Thanks but I tried that.
The problem is that the value of REMOTE_USER has no value.
I use apache version 2.2
Here are the configuration:
<Location /kongsberg>
AuthType basic
AuthName "LOS"
AuthUserFile conf/LOSbasicauth.sec
Require user u1 u2 u3
</Location>
RewriteCond %{REMOTE_HOST} (.*)
RewriteRule ^/kongsberg/(.*) http://aeoas02/LOS/kongsberg/%1/$1 [QSA,P,L]
In the access_log I get:
IPADDRESS - u1 [27/May/2009:16:03:25 +0200] "GET /kongsberg/ HTTP/1.1" 404 343
"-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0;
SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30618; InfoPath.2;
MS-RTC LM 8)"
In the rewrite log I get:
IPADDRESS - - applying pattern '^/kongsberg/(.*)' to uri '/kongsberg/'
IPADDRESS - - RewriteCond: input='' pattern='(.*)' => matched
IPADDRESS - - rewrite '/kongsberg/' -> 'http://krsoastest01/test/kongsberg//'
IPADDRESS - - forcing proxy-throughput with http://aeoas02/kongsberg//
I can't see the username in the rewrite log.
I tried several options but no value in remote_user.
Tnx, Dag
-----Opprinnelig melding-----
Fra: Stefano Sasso [mailto:[email protected]]
Sendt: 27. mai 2009 13:14
Til: [email protected]
Emne: Re: [us...@httpd] Userid and reverse proxy
2009/5/27 Efjestad, Dag <[email protected]>:
> <Location /kongsberg>
> AuthType basic
> AuthName "Requierd users"
> AuthUserFile conf/basicauth.sec
> Require user user1 user2 user3
> </Location>
> ProxyRequests Off
> ProxyPass /kongsberg/ http://aeoas02/kongsberg/%AuthenticatedUserId%
> ProxyPassReverse /kongsberg/ http://aeoas02/kongsberg/%AuthenticatedUserId%
>
>
> The variabel %AuthenticatedUserId% should contain user1, user2 or user3.
>
> Anyone know a way of solving this problem?
you can try with mod_rewrite and [P]:
RewriteEngine On
RewriteRule ^/kongsberg(.*) http://aeoas02/kongsberg/%{LA-U:REMOTE_USER}$1 [P,L]
bye,
--
Stefano Sasso
[email protected]
http://www.gnustile.net/
---------------------------------------------------------------------
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: [email protected]
" from the digest: [email protected]
For additional commands, e-mail: [email protected]