【问题标题】:Varnish 3.0.2 behind a SSL-Terminator在 SSL-Terminator 后面的 Varnish 3.0.2
【发布时间】:2015-10-30 16:54:05
【问题描述】:

请有人知道 varnish 3.0.2 是否支持 http 重定向到 https。

事实上,我在 ssl 终结器(我在其上设置 httphttps 侦听器的 aws 外部负载均衡器)后面有一个清漆缓存服务器。

我希望varnish在收到http请求时,在https中重定向,并直接将响应(resquest?)发送回负载均衡器,负载均衡器将接收作为https的响应> 请求并转发 varnih,然后将其转发到自己的后端。

但我的清漆缓存似乎没有重定向回负载均衡器,而是将 https 请求重定向到其后端。

但是清漆背后的后端我没有 https 后端,当我发出一个 http 请求时,我得到了超时。 当客户端在浏览器中输入 https 时,它可以工作。问题出在 http 请求上。

这是我的配置:

vcl_recv 中:

 if (client.ip != "127.0.0.1" && req.http.host ~ "^(?i)mydomain.com" && req.http.X-Forwarded-Proto !~ "(?i)https") {
        set req.http.x-redir = "https://" + req.http.host + req.url;
        #return(synth(850, "Moved permanently"));
        error 850 "Moved permanently";
}

vcl_error 中:

   if (obj.status == 850) {
    set obj.http.Location = req.http.x-redir;
    set obj.status = 302;
    return (deliver);
}

有人可以帮忙吗。目前我无法手动升级我的清漆版本。

谢谢

【问题讨论】:

    标签: varnish


    【解决方案1】:

    我解决了问题,

    elb 的安全组只允许连接端口 443,我为 http 监听器添加端口 80 并且它可以工作

    【讨论】:

      猜你喜欢
      • 2015-08-23
      • 2012-12-19
      • 2013-12-19
      • 2020-10-09
      • 1970-01-01
      • 2013-04-06
      • 2020-08-14
      • 2012-05-02
      • 1970-01-01
      相关资源
      最近更新 更多