httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert rottermann <rob...@redcor.ch>
Subject [users@httpd] virtual hosts and authentication
Date Wed, 05 Dec 2007 08:39:31 GMT
hi there

I try to set up a syste where the user authentication is done by apache
which the should forward the request to an application server (zope).

to be able to controll access privileges within the application server I
need to forward the name of the logged in user.

you can find the virtual host config attached.

my problem is, that the username is not passed to upstream server.

I would be gratefull if you could point out what I am doing wrong.

thanks
robert

# test
# -------------------
#
<VirtualHost *:80>
    DocumentRoot /srv/www/htdocs/
    ServerAdmin robert@redcor.net
    ServerName www.testserver.ch
    CustomLog     /var/log/apache2/testserver-access.log combined
    ErrorLog      /var/log/apache2/testserver-error.log
    LogLevel warn

    <Location />
	AuthType Basic
	AuthName "By Invitation Only"
	AuthUserFile /srv/www/htdocs/passwd/passwords
	AuthGroupFile /srv/www/htdocs/passwd/groups
	require group DieGruppe
    </Location>

    # don't loose time with IP address lookups
    HostnameLookups Off

    # needed for named virtual hosts
    UseCanonicalName Off

    RewriteEngine On
    # (This RewriteRule doesn't actually rewrite anything URL-wise.)
    RewriteCond %{LA-U:REMOTE_USER} (.+)
    RewriteRule .* - [E=RU:%1]

    # Put the username into a request header:
    RequestHeader set X_REMOTE_USER %{RU}e

    RewriteRule ^/(.*)
http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/test/VirtualHostRoot/$1
[L,P,E=RU:%1]

</VirtualHost>

Mime
View raw message