我尝试使用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"
非常感谢
答案 0 :(得分:-1)
在您的conf文件中,您正在使用varnish侦听端口80并且您正在向端口6081发送请求,这可能是一个原因。