I have tried a different approach by moving the RewriteRules into the Location directive. With this configuration, the HTTP_REMOTE_USER variable is set and visible by the backend script and application. However, REMOTE_USER is still blank. Here is the alternate configuration: ------ <Location "/test"> order deny,allow deny from all AuthType KerberosV5 AuthName "W4restrict" KrbDefaultInstance net Satisfy any require valid-user RewriteEngine on RewriteCond %{REMOTE_USER} (.+) RequestHeader Set Proxy-ip %{REMOTE_ADDR}e RequestHeader Set Host ourserver.com:443 RequestHeader set REMOTE_USER %{REMOTE_USER}e RewriteRule ^/var/www/html/test/(.*) http://localhost/cgi-bin/test/$1 [P,L,E=REMOTE_USER:%{REMOTE_USER}] </Location> ------ And here is what we see in rewrite.log: ------ 192.168.213.159 - dab66 [29/Oct/2009:11:04:47 --0400] [ourserver.com/sid#8885358][rid#971a7d0/initial] (3) [per-dir /test/] add path info postfix: /var/www/html/test -> /var/www/html/test/remote.cgi 192.168.213.159 - dab66 [29/Oct/2009:11:04:47 --0400] [ourserver.com/sid#8885358][rid#971a7d0/initial] (3) [per-dir /test/] applying pattern '^/var/www/html/test/(.*)' to uri '/var/www/html/test/remote.cgi' 192.168.213.159 - dab66 [29/Oct/2009:11:04:47 --0400] [ourserver.com/sid#8885358][rid#971a7d0/initial] (4) RewriteCond: input='dab66' pattern='(.+)' => matched 192.168.213.159 - dab66 [29/Oct/2009:11:04:47 --0400] [ourserver.com/sid#8885358][rid#971a7d0/initial] (2) [per-dir /test/] rewrite /var/www/html/test/remote.cgi -> http://localhost/cgi-bin/test/remote.cgi 192.168.213.159 - dab66 [29/Oct/2009:11:04:47 --0400] [ourserver.com/sid#8885358][rid#971a7d0/initial] (5) setting env variable 'REMOTE_USER' to 'dab66' 192.168.213.159 - dab66 [29/Oct/2009:11:04:47 --0400] [ourserver.com/sid#8885358][rid#971a7d0/initial] (2) [per-dir /test/] forcing proxy-throughput with http://localhost/cgi-bin/test/remote.cgi 192.168.213.159 - dab66 [29/Oct/2009:11:04:47 --0400] [ourserver.com/sid#8885358][rid#971a7d0/initial] (1) [per-dir /test/] go-ahead with proxy request proxy:http://localhost/cgi-bin/test/remote.cgi [OK] ------ Any suggestions for passing REMOTE_USER through an Apache proxy would be greatly appreciated. Many Thanks, Devin On Oct 28, 2009, at 4:03 PM, Devin Bougie wrote:
|