基本上我的情况是我有一个内部网站,需要一个单一的硬编码用户名和密码才能访问(这不能关闭,只能更改).我出于各种原因通过反向代理公开这个网站(隐藏端口,简化网址,简化NAT等).
但是,我想要做的是能够使用Apache来处理身份验证,以便:
编辑:关于更丰富的身份验证的第二部分已移至新问题
这或多或少是我现在所拥有的:
<VirtualHost *:80>
ServerName sub.domain.com
ProxyPass / http://192.168.1.253:8080/endpoint
ProxyPassReverse / http://192.168.1.253:8080/endpoint
# The endpoint has a mandatory password that I want to avoid requiring users to type
# I.e. something like this would be nice (but does not work)
# ProxyPass / http://username:password@192.168.1.253:8080/endpoint
# ProxyPassReverse / http://username:password@192.168.1.253:8080/endpoint
# Also need to be able to require a password to access proxy for people outside local subnet
# However these passwords will be …Run Code Online (Sandbox Code Playgroud)