Nginx+keepalived(部分配置)


Nginx-S上面也要配置跟Nginx-M上面一样的Nginx代理服务配置
Nginx-M和Nginx-S的keepalived服务配置:配置文件模板:! Configuration File for keepalivedglobal_defs {notification_email {ops@wangshibo.cntech@wangshibo.cn}notification_email_from ops@wangshibo.cnsmtp_server 127.0.0.1smtp_connect_timeout 30router_id master-node}vrrp_script chk_http_port {script “/opt/chk_nginx.sh”interval 2weight -5fall 2rise 1}vrrp_instance VI_1 {state MASTERinterface eth0mcast_src_ip 192.168.115.173virtual_router_id 51priority 101advert_int 1authentication {auth_type PASSauth_pass 1111}virtual_ipaddress {192.168.115.100}track_script {chk_http_port}}此监控脚本Nginx-S服务器上面也需要:脚本模板:#!/bin/bashcounter=$(ps -C nginx –no-heading|wc -l)if [ “${counter}” = “0” ]; thenservice nginx restartsleep 2counter=$(ps -C nginx –no-heading|wc -l)if [ “$开发云主机域名{counter}” = “0” ]; thenservice keepalived stopfifi
WEB服务器上面只需要搭建Apache服务即可,不需要做其他的网络设置将Nginx-M和Nginx-S服务器上面的keepalived和Nginx服务开启,再将/opt/下面的监控脚本执行,之后停掉任何一台Nginx代理服务器查看效果验证是否一台Nginx代理服务器宕机的情况下,另一台继续工作

相关推荐: Exchange 2019 和office online server 集成问题

exchange 2019 正式版已经出来一段时间了,关于exchange 2019和Office online server 集成,在这里我就不过多介绍了,几条命令的事情,大家可以参考以下官开发云主机域名方链接:https://docs.microsoft.…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

Like (0)
Donate 微信扫一扫 微信扫一扫
Previous 04/02 17:25
Next 04/02 17:25