Skip to content

Instantly share code, notes, and snippets.

@big-samantha
Created November 13, 2012 22:25
Show Gist options
  • Save big-samantha/4068848 to your computer and use it in GitHub Desktop.
Save big-samantha/4068848 to your computer and use it in GitHub Desktop.
#template containing this
backend appnodes
<% if @hostname =~ /^s-/ -%>
option httpchk http://host.subdomain1.company.com/foo.jpg
server s-app1 1.1.1.1:80 check inter 1m
server s-app2 2.2.2.2.153:80 check inter 1m
<% else -%>
option httpchk http://host.subdomain2.company.com/foo.jpg
server p-app1 11.11.11.11:80 check inter 1m
server p-app2 12.12.12.12:80 check inter 1m
<% end %>
#results in this
backend appnodes
option httpchk http://host.subdomain1.company.com/foo.jpg
server s-app1 1.1.1.1:80 check inter 1m
server s-app2 2.2.2.2:80 check inter 1m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment