如何在haproxy服务器后面添加ngnix

如何在haproxy服务器后面添加ngnix

我已经设置了 nginx Web 服务器,我想使用 haproxy 服务器进行负载平衡。我已经使用 apache 完成了这些工作,但无法为 nginx 完成这些工作。下面是对我有用并且能够执行负载平衡的 apache 设置。

frontend http-in
         acl host_abc hdr_end(host) -i xyz.example.com
         use_backend abc if host_abc
backend abc
        balance leastconn
        mode http
        timeout client          5m
        timeout server          5m
        option httpchk
        option forwardfor
        server scmauto1 xxx.xxx.xxx.xxx:80 check

我对 nginx 所做的设置相同,但这些设置不起作用。

相关内容