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