Take a look at the mod proxy RequestHeader set directive. Assuming
the remote user is in an environment variable somewhere, you can use
this directive to pass it on to mongrel. I use it to pass along a
bunch of mod ssl env variables.
I forgot, mongrel prefixes all the env variables with HTTP_. So check
HTTP_REMOTE_USER and see if that's it. Took me a bit to notice that
myself.
Chris
Will Rogers wrote:
If anyone knows why my attempts to read REMOTE_USER return (null), I'm
all ears.
After many hours trying to solve the same problem I found this post:
http://www.nabble.com/Forcing-a-proxied-host-to-generate-REMOTE_USER-tf1114364.html#a2914465
and can confirm that the following works for me when put in the Proxy
directive on Apache 2:
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule . - [E=RU:%1]
RequestHeader add X-Forwarded-User %{RU}e
Jon.
I never figured out how to do any of apache's auth schemes on anything
other than directories. Your mileage doesn't look to vary on this.
I know in lighttpd you could auth the entire site, but for alas, I
always balk and toss my secret stuff on really high, random ports or
just lock down to IPs. I know, not the most secure, but it works.
Sorry for the non-help.
Cayce Balara wrote:
Even non-help helps, at least I can move on to other options and stop
banging my head against this mad bugger's wall.thanks for the info.
c.
Charles Brian Quinn wrote:
I never figured out how to do any of apache's auth schemes on anything
other than directories. Your mileage doesn't look to vary on this.I know in lighttpd you could auth the entire site, but for alas, I
always balk and toss my secret stuff on really high, random ports or
just lock down to IPs. I know, not the most secure, but it works.Sorry for the non-help.
Sorry for bumping such an old post. I'm having trouble trying to
> The following works and provides me with authentication, I have
> Order allow,deny
> RewriteCond %{LA-U:REMOTE_USER} (.+)
> <VirtualHost *:80>
> <VirtualHost *:80>
> PerlAddVar ntdomain "CROWLEY crowleypdc jaxbdc01"
> I get the following error with this configuration:
>--
Charles Brian Quinn
self-promotion: www.seebq.com
highgroove studios: www.highgroove.com
slingshot hosting: www.slingshothosting.com
HI,
I am facing problem to get the authenticated user using mod_auth_sspi.
my httpd.conf file has follwoing.
VirtualHost *:80>
ServerAdmin adminemailid
ServerName Portal
DocumentRoot rootpath
<Directory Z:/web/appname/public/ >
AllowOverride All
Order allow,deny
allow from all
</Directory>
#Rewrite stuff
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule . - [E=RU:%1]
RequestHeader add X-Forwarded-User %{RU}e
# Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
# Rewrite index to check for static
#RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
#RewriteRule ^([^.]+)$ $1.html [QSA]
# Redirect all non-static requests to cluster
#RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME !-f
RewriteRule ^/(.*)$ balancer://SSDEIPortal_cluster%{REQUEST_URI}
[P,QSA,L]
</VirtualHost>
In the above config i am using same config dicussed in this post as
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule . - [E=RU:%1]
RequestHeader add X-Forwarded-User %{RU}e
but still i am not getting the result.
Thanks in advance.