1、实验环境:此处都使用是Centos 7系统
Hostname | IP | 说明 |
LB01 | 192.168.11.80 | keepalived+nginx |
LB02 | 192.168.11.81 | keepalived+nginx |
web01 | 192.168.11.83 | nginx(web服务) |
web02 | 192.168.11.84 | nginx(web服务) |
测试电脑一台:IP:192.168.11.90
在所有节点服务器上面关闭firewalld、selinux,并安装httpd服务。
2、配置后端web服务器(web01和web02)
[root@web01 ~]# echo "This is web01" >/usr/share/nginx/html/index.html [root@web02 ~]# echo "This is web02" >/usr/share/nginx/html/index.html
原文:https://www.cnblogs.com/comprehensive/p/12106660.html