q4561231 发表于 2018-11-9 10:15:06

Nginx+keepalived+Tomcat集群架构

! Configuration File for keepalived  
global_defs {
  
   notification_email {
  
   1075841124@qq.com
  
   }
  
   notification_email_from Alexandre.Cassen@firewall.loc
  
   smtp_server 127.0.0.1
  
   smtp_connect_timeout 30
  
   router_id LVS_DEVEL
  
}
  
vrrp_script chk_nginx {    script "kill all -0 nginx"    interval 1    weight -2    fall 2    rise 1}             这是keepalived对nginx的健康监测
  
vrrp_instance VI_1 {
  
    state MASTER      主为MASTER。备为BACKUP
  
    interface eth0
  
    virtual_router_id 51主和备相同
  
    priority 100         主高备低
  
    advert_int 1
  
    authentication {
  
      auth_type PASS
  
      auth_pass 1111
  
    }
  
    virtual_ipaddress {
  
      192.168.115.222
  
      192.168.115.111
  
      192.168.115.99
  
    }
  
track_script {
  
   chk_nginx
  
}
  
}


页: [1]
查看完整版本: Nginx+keepalived+Tomcat集群架构