Skip to content

Instantly share code, notes, and snippets.

@kim3er
Created September 14, 2012 11:00
Show Gist options
  • Save kim3er/3721305 to your computer and use it in GitHub Desktop.
Save kim3er/3721305 to your computer and use it in GitHub Desktop.
Virtual Host configuration for Rails with NTLM using mod_auth_sspi. <%= request.env["HTTP_X_FORWARDED_USER"] %> # Gets Username
<VirtualHost *:80>
ServerName cagv11
DocumentRoot "C:/web/testing/public"
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
ProxyPreserveHost On
<Proxy *>
AuthName "Iconica"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIOmitDomain On
require valid-user
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule . - [E=RU:%1]
RequestHeader add X-Forwarded-User %{RU}e
</Proxy>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment