0

我想使用我的服务器(安装 Varnished 的地方)来缓存远程虚拟主机的网页

默认.vcl

backend default {
    .host = "shavrea.com";
    .port = "80";
}

如果写这个,不起作用并返回这个错误:

Site Temporarily Unavailable

We apologize for the inconvenience. Please contact the webmaster/ tech support immediately to have them rectify this.
error id: "bad_httpd_conf"

这是因为该后端位于共享服务器上。如何解决这个问题?

4

1 回答 1

3

尝试显式设置 Host 标头。

sub vcl_recv {
  set req.http.host = "shavrea.com";
}
于 2012-02-13T08:42:37.830 回答