我使用的应用程序通过 HTTP 与服务器通信,但在我的例子中,该服务器在 HTTPS 上运行,并且还有基本身份验证。无法更改此设置。
我的想法是在 Apache 服务器上配置代理,然后可以通过 http://localhost/ 访问网站而 apache 将类似于中介。我不想要重定向,而是像映射这样的东西。
我尝试了如下配置,但没有成功。
<VirtualHost *:80>
ServerName foo.com
SSLProxyEngine On
ProxyPass / https://login:passwd@secured.web.com
ProxyPassReverse / https://login:passwd@secured.web.com
</VirtualHost>
我会为每一个想法感到高兴。
最佳答案
快速搜索会发现是这样的:
https://superuser.com/questions/704781/apache-mod-proxy-with-automatic-authentication
应该允许您执行身份验证并将其添加到 header 中。
关于windows - Apache 代理 - HTTP 到 HTTPS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30323579/