Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | 雲棲社區 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Github | Search | About

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

目錄

129.1. Installing
129.1.1. Ubuntu
129.1.2. CentOS
129.2. haproxy.cfg
129.2.1. stats
129.2.2. listen 方式
129.2.3. frontend/backend 方式
129.2.4. option
129.2.4.1. httpclose
129.2.4.2. forwardfor
129.2.4.3. httpchk
129.2.5. balance
129.2.6. server
129.3. Example 配置實例
129.3.1. HTTP 配置實例
129.3.1.1. 插入Cookie會話保持
129.3.1.2. HTTP URL 檢查
129.3.2. Squid
129.3.3. haproxy + mysql 配置實例
129.3.4. HTTPS SSL證書卸載配置實例
129.3.5. 使用TCP模式實現SSL穿透
129.3.6. SMTP

129.1. Installing

129.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

129.1.2. CentOS

			
yum install haproxy