用戶在我的Apache 2的配置我有一個VirtualHost
這看起來是這樣的:的Apache2 - 授權使用基本驗證對一個位置的用戶,但僅適用於外部本地子網
<VirtualHost *:80>
ServerName sub.domain.com
# username:password sent on to endpoint
RequestHeader set Authorization "Basic dXNlcm5hbWU6cGFzc3dvcmQ=="
ProxyPass /xyz http://192.168.1.253:8080/endpoint
ProxyPassReverse /xyz http://192.168.1.253:8080/endpoint
<Location /xyz>
# This needs to let users through under the following circumstances
# * They are in 192.168.1.0/24
# * They have a valid user in a htpasswd file
# So what goes here?
</Location>
</VirtualHost>
我現在用的是虛擬主機作爲反向代理到網絡上的另一臺服務器(我將稱之爲端點)。
我想弄清楚一個配置,允許網絡內的用戶瀏覽到sub.domain.com
自動服務端點。但是,網絡外的用戶應該被提示輸入憑據
端點需要一個我使用RequestHeader(我想要)隱藏的密碼。外部用戶的密碼應該是不同的,並且需要是BasicAuth,從htpasswd
文件中獲取用戶列表。
好吧,我現在看到你想要的。 :)大衛的答案是100%正確的,他打我(它在編輯回覆時遇到了無線網絡問題)。 – vladr 2009-02-24 01:06:32