Sigh, this was seen as spam so I have changed some formatting to try to get around that.
Hugo said:
] HTTP authentication settings are handled before forwarding a request
] to a reverse proxy. ...
Ok, so I can't mix authenticated reverse proxy and unauthenticated
resources in a single VirtualHost. Also there is no way to set a
different username/password config for each reverse proxied server in
a VirtualHost.
Do you know if my redirection hack and Host Header change method would
work?
Also using Directory/PasswordFile I set up passwords for the non
proxied services: owncloud and foswiki.
Directory {
Path = /var/www/owncloud
ExecuteCGI = yes
FollowSymlinks = yes
SetEnv HOME = /var/www/owncloud
SetEnv HTTP_HOME = /var/www/owncloud
PasswordFile = Basic:/usr/local/etc/hiawatha/passwd/owncloud
}
I set up the same config for foswiki and it worked as expected.
However I wanted to use a different password file (and different
username/password) for Foswiki. So I have one username/password
configuration for uland:/foswiki and another one for uland:/owncloud.
AFAIK the browser stores a:
hostname, realm
with each directory path on a server that requests an authentication
to see if it can respond to an auth request. So I assume I need two
different realms one for foswiki and one for owncloud so the proper
username/password would be provided. IIUC the Realm is defined by the
LoginMessage option.
I tried:
Directory {
Path = /var/www/owncloud
ExecuteCGI = yes
FollowSymlinks = yes
SetEnv HOME = /var/www/owncloud
SetEnv HTTP_HOME = /var/www/owncloud
PasswordFile = Basic:/usr/local/etc/hiawatha/passwd/owncloud
LoginMessage = Owncloud
}
Testing with wigwam showed:
$ sudo -u www-data wigwam -c /usr/local/etc/hiawatha/
Using /usr/local/etc/hiawatha/
Reading hiawatha.conf
No non-fatal errors found in the Hiawatha configuration.
But when restartng I see:
$ sudo kill `cat /usr/local/var/run/hiawatha.pid `; sleep 5; \
sudo /usr/local/sbin/hiawatha -c /usr/local/etc/hiawatha
Syntax error in hiawatha.conf on line 217.
Line 217 is the LoginMessage parameter and hiawatha did not start.
So looks like there are two issues here:
1) how do I specify the LoginMessage
2) wigwam is not reporting an error
It seems some browsers (e.f. firefox) will do the right thing
even if the realm is the same since I did manage to get different
basic auth passwords to work for /owncloud and /foswiki. Not quite
sure how that works, but I would still like to have different realms.
On a totally different topic, is there an rss feed for the forums?
-- rouilj