-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Try moving the location block end tag to encompass the Rewrite rule for
the header like so:
<VirtualHost *:80>
DocumentRoot /srv/www/htdocs/
ServerAdmin [EMAIL PROTECTED]
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
# 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
</Location>
RewriteRule ^/(.*)
http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/test/VirtualHostRoot/$1
[L,P,E=RU:%1]
</VirtualHost>
[EMAIL PROTECTED]
robert rottermann wrote:
> 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 [EMAIL PROTECTED]
> 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>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> 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: [EMAIL PROTECTED]
> " from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHVs6wtqidmIdniVgRAjvnAKCFz2P5L9PM4WhPKaUtbeplEhh1BQCcCgTe
iWlMjgwINenkG6hPgzRojIA=
=jDiU
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]