Home | Mirror | Search

第 123 章 HAProxy - fast and reliable load balancing reverse proxy

目錄

1. Installing
1.1. Ubuntu
1.2. CentOS
2. haproxy.cfg
2.1. stats
2.2. listen 方式
2.3. frontend/backend 方式
2.4. option
2.4.1. httpclose
2.4.2. forwardfor
2.4.3. httpchk
2.5. balance
3. Example 配置實例
3.1. HTTP 配置實例
3.1.1. 插入Cookie會話保持
3.2. Squid

1. Installing

1.1. Ubuntu

$ apt-cache search haproxy
haproxy - fast and reliable load balancing reverse proxy

sudo apt-get install haproxy
			

啟用HAProxy

$ sudo vim /etc/default/haproxy
# Set ENABLED to 1 if you want the init script to start haproxy.
#ENABLED=0
ENABLED=1
# Add extra flags here.
#EXTRAOPTS="-de -m 16"
			

ENABLED=0 改為 ENABLED=1

1.2. CentOS

			
yum install haproxy
			
			
comments powered by Disqus