我在 HAProxy 设置了一堆侦听其他各种端口的应用程序服务器方面取得了一些初步成功。
我现在有另一个网络服务器在一个端口上侦听,我想对我的配置进行哪些更改以按主机名传输流量。
以下是当前设置,假设:
Run Code Online (Sandbox Code Playgroud)global log 127.0.0.1 local0 log 127.0.0.1 local1 notice maxconn 4096 debug #quiet #user haproxy #group haproxy defaults log global mode http option httplog option dontlognull retries 3 redispatch maxconn 2000 contimeout 5000 clitimeout 50000 srvtimeout 50000 listen appservers 0.0.0.0:80 mode http balance roundrobin option httpclose option forwardfor #option httpchk HEAD /check.txt HTTP/1.0 server inst1 0.0.0.0:8081 cookie server01 check inter 2000 fall 3 server inst2 0.0.0.0:8082 …