Re: [users@httpd] Mod_header REMOTE_USER variable null via reverse proxy server - HELP!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joshua,
Thank you for your response. But, it did not work.  Here is a snippet from my httpd.conf file.
 
### Start - SNIPPET FROM HTTPD.CONF##
ProxyRequests Off
ProxyPass / http://localhost:8081/
ProxyPassReverse / http://localhost:8081/

RewriteRule .* - [E=RU:%{LA-U:REMOTE_USER}]
RequestHeader set UserId %{RU}e

<Location />

 AuthUserFile "C:\Program Files\Apache Group\Apache2\sbacces"
 AuthName "Secured access Apache"
 AuthType basic
 Require valid-user

</Location>

### End - SNIPPET FROM HTTPD.CONF##

Output from TCPMON headers:

Host: localhost:8080
Accept: */*
Accept-Language: en-us
If-Modified-Since: Fri, 05 Aug 2005 15:03:27 GMT
If-None-Match: W/"92-1123254207000"
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE6SP1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Authorization: Basic c2FiOnNhYjEyMw==
UserId: (null)

Your help will be highly appreciated. THank you in advance.

Bharmal



 
On 4/27/06, Joshua Slive <joshua@xxxxxxxx> wrote:
On 4/26/06, Shabbir bharmal <bharmals@xxxxxxxxx> wrote:
> I have Apache 2.2 setup using mod_proxy, mod_headers and mod_auth
> successfully. I am using Apache as my web server and Apache Tomcat as
> my web container where my application    is deployed.
>
> Mod_auth challenges a browser session to enter a username and password
> when accessing a page on my tomcat container. The username needs to be
> set as a 'UserId' variable to be sent over to a reverse proxy
> connection to a specific host where the application resides.
>
> I have tried using the REMOTE_USER variable in a number of ways. To
> show a couple of them:
>
> 1. RequestHeader set UserId %{REMOTE_USER}e
> 2. RequestHeader set UserId %{LA-U:REMOTE_USER}e

Those variables are for mod_rewrite/mod_cgi and are not available to
mod_headers.  You may be able to use something like:

RewriteRule .* - [E=RU:%{LA-U:REMOTE_USER}]
RequestHeader set UserId %{RU}

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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux