Skip to content

Instantly share code, notes, and snippets.

@sdon2
Last active August 4, 2022 07:52
Show Gist options
  • Save sdon2/d18bc64b89f4b53e08179f0f638cec2b to your computer and use it in GitHub Desktop.
Save sdon2/d18bc64b89f4b53e08179f0f638cec2b to your computer and use it in GitHub Desktop.
Append this HAProxy configuration to separate certain requests from the application server
frontend http
bind *:80
mode http
acl reports_acl path_beg /peretemr/interface/financial_ajax/
use_backend reports_backend if reports_acl
default_backend app_backend
backend app_backend
balance leastconn
server appserver1 192.168.0.132:80 check
backend reports_backend
balance leastconn
server reportserver1 192.168.0.194:80 check
listen stats
bind *:9000
mode http
stats enable
stats realm Haproxy\ Statistics
stats uri /stats
stats auth admin:admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment