global log 127.0.0.1 local0 log 127.0.0.1 local1 notice maxconn 4096 user haproxy group haproxy daemon defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 2000 contimeout 5000 clitimeout 50000 srvtimeout 50000 frontend http-in bind *: 80 acl is_example_com hdr_beg (host)-i example.com acl is_domain_com hdr_beg (host)-i domain.com use_backend example_com if is_example_com use_backend domain_com if is_domain_com default_backend example_com backend example_com balance roundrobin cookie SERVERID insert nocache indirect option httpchk HEAD / check.txt HTTP/1.0 option httpclose option forwardfor server Server1 10.1.1.1:80 cookie Server1 server Server2 10.1.1.2:80 cookie Server2 backend domain_com balance roundrobin cookie SERVERID insert nocache indirect option httpchk HEAD / check.txt HTTP/1.0 option httpclose option forwardfor server Server1 192.168.5.1:80 cookie Server1 server Server2 192.168.5.2:80 cookie Server2 Domains using HAProxy load balancing multi ACL March 12,abercrombie, 2010 Lake
good use HAProxy has been a very long time . In the past are handled first by the Apache problem domain ,doudoune moncler, and then to the HAProxy to do follow-up action. Until recently I joined the ACL mechanism HAProxy ,longchamp, so that a direct replacement for Apache HAProxy work . Allows multiple URLs to a WEB machine can achieve the ideal balance the load .
The following is my haproxy.conf set an example for reference :
相关的主题文章: in the process of Internet development in China, Ma, Li, Chao, Ding, Kai-fu Lee brought together five scenes of man should be rare. In 2011 China Internet Conference opening ceremony, this scene would take place. In the Ideological confrontation with Taiwan, Li Kai-fu Lee have to ask for? Ma Chao will ask something what? This time the unprecedented collision of ideas is really exciting!