Haproxy configuration
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
global
|
||||
stats socket /var/run/api.sock user haproxy group haproxy mode 660 level admin expose-fd listeners
|
||||
log stdout format raw local0 info
|
||||
|
||||
defaults
|
||||
mode http
|
||||
timeout client 10s
|
||||
timeout connect 5s
|
||||
timeout server 10s
|
||||
timeout http-request 10s
|
||||
log global
|
||||
|
||||
frontend stats
|
||||
bind *:8404
|
||||
stats enable
|
||||
stats uri /
|
||||
stats refresh 10s
|
||||
|
||||
frontend myfrontend
|
||||
bind :80
|
||||
default_backend webservers
|
||||
|
||||
backend webservers
|
||||
server s1 web1:8080 check
|
||||
server s2 web2:8080 check
|
||||
server s3 web3:8080 check
|
||||
29
haproxy/config/haproxy.cfg.b2
Normal file
29
haproxy/config/haproxy.cfg.b2
Normal file
@@ -0,0 +1,29 @@
|
||||
global
|
||||
log stdout format raw local0 info
|
||||
|
||||
defaults
|
||||
mode http
|
||||
timeout client 10s
|
||||
timeout connect 5s
|
||||
timeout server 10s
|
||||
timeout http-request 10s
|
||||
log global
|
||||
|
||||
frontend stats
|
||||
bind *:HAPROXY_STATS_PORT
|
||||
stats enable
|
||||
stats uri /
|
||||
stats refresh 10s
|
||||
|
||||
frontend web
|
||||
bind :HAPROXY_PORT
|
||||
default_backend webui
|
||||
|
||||
acl uri_api path_beg /api
|
||||
use_backend api if uri_api
|
||||
|
||||
backend webui
|
||||
server webui H_LOCAL_IP:FRONTEND_PORT check
|
||||
|
||||
backend api
|
||||
server api H_LOCAL_IP:BACKEND_PORT check
|
||||
Reference in New Issue
Block a user