Created
January 7, 2014 14:21
-
-
Save boris/8299978 to your computer and use it in GitHub Desktop.
haproxy balance by uri. if the uri is www.something.com/something, traffic will be forwarded to front-3
This file contains hidden or 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
| frontend front-in | |
| bind 0.0.0.0:80 | |
| acl custom_uri path_beg /something | |
| use_backend super_server if custom_uri | |
| default_backend all_servers | |
| backend all_servers | |
| balance roundrobin | |
| option httpclose | |
| option forwardfor | |
| server front-1 1.1.1.1 front-1 check | |
| server front-2 1.1.1.2 front-2 check | |
| backend super_server | |
| balance roundrobin | |
| option httpclose | |
| option forwardfor | |
| server front-3 1.1.1.3 front-3 check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment