Last active
December 17, 2015 21:59
-
-
Save caquino/5678420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -t mangle -A PREROUTING -d VIP.IP.ADDRESS/32 -p tcp -m tcp --dport 80 -j MARK --set-mark 80 | |
iptables -t mangle -A PREROUTING -d VIP.IP.ADDRESS/32 -p tcp -m tcp --dport 443 -j MARK --set-mark 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virtual_server fwmark 80 { | |
delay_loop 5 | |
lb_kind NAT | |
lb_algo lc | |
persistence_timeout 600 | |
protocol TCP | |
real_server SERVER.01.IP 0 { | |
weight 1 | |
HTTP_GET { | |
url { | |
path / | |
status_code 200 | |
} | |
connect_timeout 15 | |
connect_port 80 | |
} | |
SSL_GET { | |
url { | |
path / | |
status_code 200 | |
} | |
connect_timeout 15 | |
connect_port 443 | |
} | |
} | |
real_server SERVER.02.IP 0 { | |
weight 1 | |
HTTP_GET { | |
url { | |
path / | |
status_code 200 | |
} | |
connect_timeout 15 | |
connect_port 80 | |
} | |
SSL_GET { | |
url { | |
path / | |
status_code 200 | |
} | |
connect_timeout 15 | |
connect_port 443 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment