Apache mod_auth和mod_proxy不能一起工作
我试图设置Apache作为身份validation前端运行在端口8080的Web后端。后端没有身份validation,所以如果你curl localhost:8080你得到的网站。 端口8080被外部阻塞,所以我想要的是为Apachevalidation用户访问端口80,然后代理端口8080。 我相信这应该是可能的,按照这个post在stackoverflow: https : //stackoverflow.com/questions/724599/setting-up-an-apache-proxy-with-authentication 我试图复制这个,但是,我不能让Apache进行身份validation; 它只是直接传递给代理。 这是虚拟主机configuration: <VirtualHost *:80> ServerName external.mywebsite.com <Location "/"> Satisfy any require valid-user order allow,deny Allow from all </Location> ProxyRequests off ProxyPreserveHost on ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ <Proxy *> Order deny,allow Allow from all AuthType Basic AuthName "Private" AuthBasicProvider file AuthUserFile /path/to/htpasswd Require valid-user </Proxy> </VirtualHost> […]