架构总览与组件选型
部署步骤
高可用与故障切换设计
关键配置示例
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 100
advert_int 1
authentication { auth_type PASS; auth_pass ab007 }
virtual_ipaddress { 192.168.12.21/24 }
}
frontend http-in
bind 192.168.12.21:80
default_backend lamp_servers
backend lamp_servers
balance roundrobin
option httpchk GET /health.php
server web1 192.168.12.101:80 check inter 2s fall 3 rise 2
server web2 192.168.12.102:80 check inter 2s fall 3 rise 2
/var/www 192.168.12.0/24(rw,sync,no_root_squash)
/var/www/uploads 192.168.12.0/24(rw,sync,no_root_squash)
192.168.12.10:/var/www /var/www nfs defaults,soft,intr 0 0
192.168.12.10:/var/www/uploads /var/www/uploads nfs defaults,soft,intr 0 0
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/$1
DirectoryIndex /index.php index.html
监控运维与容量规划