在我的 Apache 2 配置中,我有一个VirtualHost
看起来像这样的:
<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
文件中获取它的用户列表。