今天折腾TCP端口转发的坑

在centos7上安装好后使用的时候要把下面两个参数注释。然后就行配置。不然会报错http参数问题

defaults
    mode                    http
    log                     global
#    option                  httplog
    option                  dontlognull
    option http-server-close
#    option forwardfor       except 127.0.0.0/8
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 3000
frontend tcp-2013-front
    bind 172.24.19.176:1204
    mode tcp
    default_backend     tcp-2013-back

backend tcp-2013-back
   mode tcp
   balance leastconn
   server tcp-2013 10.0.0.10:1204
haproxy -c -V -f /etc/haproxy/haproxy.cfg   验证

验证没问题,启动报错 ,关闭sLinux

setenforce 0
vim /etc/sysconfig/selinux

SELINUX=enforcing 改为 SELINUX=disabled
说点什么
支持Markdown语法
好耶,沙发还空着ヾ(≧▽≦*)o
Loading...