« Return to Thread: Forcing a proxied host to generate REMOTE_USER

Re: Forcing a proxied host to generate REMOTE_USER

by Joshua Slive-2 :: Rate this Message:

Reply to Author | View in Thread

On 2/13/06, jens persson <jens@...> wrote:

>
> Hello all!
>
> I'm having trouble with a proxy setup, where I need to generate a
> REMOTE_USER variable for a cgi-script, but also allow no-authenticated use.
>
> The setup to allow authentication ether by http-auth and remote ip, and
> then froward the calls to an inner server where the cgi-program checks
> for the presence of REMOTE_USER in the environment or else uses
> REMOTE_ADDR (which I extract from HTTP_X_FORWARDED_FOR in a wrapper
> script). I cant seem to get this working :-(

So I guess you want to pass REMOTE_USER from the proxy to the origin
server.  Something like this might work:

RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule . - [E=RU:%1]
Header add X-Forwarded-User %{RU}e

(Ouch, that's complicated.  And I'm not sure it will work; depends on
the order of hook processing.)

Joshua.

---------------------------------------------------------------------
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@...
   "   from the digest: users-digest-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Forcing a proxied host to generate REMOTE_USER