【发布时间】:2014-10-25 22:21:44
【问题描述】:
我尝试使用 apache2 在我的 debian 7 上安装 Varnish。
但是当我输入 www.mydomain.com:6081 来测试连接时,我得到一个 503 错误服务不可用。
清漆日志说:
12 Hash c www.mywebsite.com:6081
12 VCL_return c hash
12 VCL_call c pass pass
12 FetchError c no backend connection
12 VCL_call c error deliver
12 VCL_call c deliver deliver
12 TxProtocol c HTTP/1.1
12 TxStatus c 503
我的 etc/varnish/default.vcl 文件: (目前只有一个后端)
backend site1 {
.host = "92.243.5.12"; // ip adress for www.mydomain.com
.port = "8080";
.connect_timeout = 6000s;
.first_byte_timeout = 6000s;
.between_bytes_timeout = 6000s;
}
# Default backend is set to site1
set req.backend = site1;
我的 etc/default/varnish 文件:
DAEMON_OPTS="-a :80
-T localhost:6082
-f /etc/varnish/default.vcl
-S /etc/varnish/secret
-p thread_pool_add_delay=2
-p thread_pools=4
-p thread_pool_min=200
-p thread_pool_max=4000
-p cli_timeout=25
-p session_linger=100
-s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"
非常感谢
【问题讨论】:
-
您的站点是否在 IP 92.243.5.12 的 8080 端口上运行
-
站点运行在 80 端口,ip 92.243.5.12
-
-
虽然从
DAEMON_OPTS看来,Varnish 也试图在端口 80 上启动。
标签: varnish varnish-vcl