使用haproxy做端口转发
- 2019 年 11 月 22 日
- 筆記
ubuntu系统
- 安装haproxy
apt-get install -y haproxy
- 修改配置文件 /etc/haproxy/haproxy.cfg
global ulimit-n 51200 defaults log global mode tcp option dontlognull contimeout 1000 clitimeout 150000 srvtimeout 150000 frontend ss-in bind *:8080 default_backend ss-out backend ss-out server server1 104.243.28.87:8085 maxconn 20480
- 启动进程
service haproxy start
- 如果还不行,直接
./haproxy -f /etc/haproxy/haproxy.cfg