2014-09-01 100 views
0

我试图用apache2在我的debian 7上安装清漆。清漆错误:没有后端连接

但是,当我输入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 

我等/清漆/ 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; 

我等/默认/清漆文件:

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" 

非常感谢你

+1

您的站点在端口8080上运行,IP地址为92.243.5.12 – KNOWARTH 2014-09-02 04:52:14

+1

该站点运行在端口80上,IP地址为92.243.5.12 – user3066341 2014-09-02 08:04:49

+1

在这种情况下,您需要将Varnish端口更改为听取80以外的内容,并检查相同的配置或更新“.port =”80“;通过Varnish检查端口80上的站点侦听 – KNOWARTH 2014-09-03 05:46:45

回答

-1

在您的conf文件中,您正在使清漆听到端口80,并且您正在向端口6081发送请求,这可能是一个原因。