- 论坛徽章:
- 0
|
haproxy 反向代理配置问题
本人按网上教程自编译后运行后想做反向代理配置但出现如下情况
配置文件:
global
maxconn 5120
chroot /usr/local/haproxy
uid 504
gid 506
daemon
quiet
nbproc 2
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen appli1 0.0.0.0:90
mode http
option httplog
option dontlognull
log 127.0.0.1 local3
cookie SERVERID rewrite
balance roundrobin
option httpchk
stats uri /stats
stats auth admin:admin
server app1_1 192.168.1.250:80 cookie app1inst1 check inter 2000 rise 2 fall 5
按正常来讲应该90口是要显示192.168.1.250 80口的内容,但网页提示:
503 Service Unavailable
No server is available to handle this request.
不知道什么原因。但是stats还是可以进的, 用lsof -i:90 是有看到进程的,说明配置是生效的。但不知道为什么不能反向
appli1
Queue Sessions Bytes Denied Errors Warnings Server
Cur Max Limit Cur Max Limit Total LbTot In Out Req Resp Req Conn Resp Retr Redis Status Wght Act Bck Chk Dwn Dwntme Thrtle
Frontend 1 1 2000 1 0 0 0 0 0 OPEN
swapp_1 0 0 - 0 0 - 0 0 0 0 0 0 0 0 0 1s DOWN 1 Y - 0 1 1s -
Backend 0 0 0 0 2000 0 0 0 0 0 0 0 0 0 0 1s DOWN 0 0 0 1 1s
显示swapp_1状态是DOWN。。。。
请高手指正。谢谢! |
|