我试着用apache2在我的Debian7上安装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"非常感谢
发布于 2018-03-02 06:41:20
在您的conf文件中,您让varnish侦听端口80,并向端口6081发送请求,这可能是一个原因。
https://stackoverflow.com/questions/25610058
复制相似问题