httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Forcing a proxied host to generate REMOTE_USER
Date Mon, 13 Feb 2006 17:03:48 GMT
On 2/13/06, jens persson <> 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.)


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message