1

是否可以通过 HTTPS 将代理反向代理到内部服务器并从后端服务器提供证书而不是代理上的证书?

4

3 回答 3

2

konqi> 这几乎是我多年来一直使用的反向代理配置,使用重写规则而不是代理指令,这在此处无法正常工作。

RewriteEngine On
# is the virtualhost in the allowed server list ?
RewriteCond %{SERVERNAME} ^(server1|server2|server3|server4)\.domain\.com$
# then redirect to the real server (which the virtualhost name resolves to on the proxy)
RewriteRule ^/(.*)$ https://%{SERVER_NAME}/$1 [P]
# else block it all
RewriteRule ^.*$ - [F]

干净利落。

于 2011-04-12T23:21:14.607 回答
1

我相信这是不可能的,因为它会允许中间人攻击

于 2009-02-13T23:46:42.083 回答
0

发现这个配置如下:

  • 您有一个域 example.com,其中包含不同的子域作为 VHOST(one.example.com、two.example.com、..)
  • 您的域 *.example.com 有一个通配符证书
  • 你需要 mod_proxy
  • 代理指令适用于匹配 *.example.com 的不同服务器名
  • 如果代理后面没有其他网络服务器,请在上面的 VirtualHost:443 配置中为您的域添加不带 SSL 的代理。

辣妹!不敢相信这行得通,但似乎行得通!没有找到该行为的任何规范,但请自己尝试。

亲切的问候,~马塞尔

PS:这里不涉及任何安全问题!请记住,这些对“后端”的代理调用是不安全的,因此(如 Rob 所述)具有潜在危险!

于 2011-02-15T08:56:00.773 回答