haproxy配置地址重定向

frontend free
        bind *:8002
        default_backend qzxy
backend qzxy
        mode http
        option forwardfor header ORIG_CLIENT_IP
    server server1 121.14.36.6:80 redir http://xy.13qz.com:80 check inter 2000 rise 3 fall 3 weight 3
                            
#        server 121.14.36.6:80 redir http://xy.13qz.com:80 weight 10 rise 3 fall 5 check inter 2000


重启haproxy

[root@mail conf]# /usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/conf/haproxy.cfg -st `cat /usr/local/haproxy/logs/haproxy.pid`


启动haproxy

[root@mail conf]# /usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/conf/haproxy.cfg

淘宝小店-运维学习参考资料

http://shop62632578.taobao.com


你可能感兴趣的:(haproxy)