Skip to content

Instantly share code, notes, and snippets.

@Nurlan199206
Created February 16, 2020 06:09
Show Gist options
  • Save Nurlan199206/3a9a1216fdacb8b810b67ce2affc34cf to your computer and use it in GitHub Desktop.
Save Nurlan199206/3a9a1216fdacb8b810b67ce2affc34cf to your computer and use it in GitHub Desktop.
keepalived config
================================================SRV-1=======================================================
! Configuration File for keepalived
global_defs {
router_id NGINX_MASTER
}
vrrp_instance NGINX_VRRP_1 {
state MASTER
interface enp0s3
virtual_router_id 50
priority 200
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.0.120
}
}
========================================SRV-2================================================
! Configuration File for keepalived
global_defs {
router_id NGINX_BACKUP
}
vrrp_instance NGINX_VRRP_2 {
state BACKUP
interface enp0s3
virtual_router_id 50
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.0.120
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment