今天来看看nginx+keepalived是如何搭建的:
先看一下扩展图是什么样的?
整体就是这样,
两台nginx服务转发服务器
三台web server服务器
两台mysql主从服务器
必要的说一下,安装的nginx环境必须是一样的。
nginx+keepalived主辅切换
http://deidara.blog.51cto.com/400447/302402/
keepalived负载均衡
http://blog.csdn.net/e421083458/article/details/30092795
http://blog.csdn.net/e421083458/article/details/30086413
http://www.cnblogs.com/holbrook/archive/2012/10/25/2738475.html
http://blog.csdn.net/luxiaoyu_sdc/article/details/7333024
2 修改nginx配置文件,添加监控状态配置
在nginx.conf的server块中添加如下代码
location /nginx_status{ # Turn on nginx stats stub_status on; # I do not need logs for stats access_log off; # Security: Only allow access from 192.168.1.100 IP# #allow 192.168.1.100; # Send rest of the world to /dev/null# #deny all; }
Nginx+Keepalived高可用集群
https://blog.51cto.com/superpcm/2095395
CenOS7下Nginx集群搭建
https://blog.csdn.net/qq_21153619/article/details/81771707
Nginx集群(负载均衡)