Created
December 12, 2015 11:01
-
-
Save pumbaEO/1ea35922c6b2d0102448 to your computer and use it in GitHub Desktop.
пример настройки haproxy для публикации репа 1с
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
global | |
maxconn {{or (key "service/haproxy/maxconn") 256}} | |
debug | |
defaults | |
mode http | |
timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} | |
timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} | |
timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} | |
listen stats | |
bind *:8001 | |
option httpclose | |
option forwardfor | |
stats enable | |
stats uri /haproxy?stats | |
stats auth admin:123123q | |
stats realm HAProxy\ Statistics | |
frontend http | |
bind *:80 | |
{{range $tag, $services := service "repoonec-80" | byTag}} | |
acl {{$tag}} path_beg -i /{{$tag}} | |
{{range $services}} | |
use_backend srvs_{{.Name}}{{$tag}} if {{$tag}} | |
{{end}}{{end}} | |
default_backend default | |
{{range $tag, $services := service "repoonec-80" | byTag}} | |
{{range $services}} | |
#use_backend srvs_{{.Name}}{{$tag}} if {{$tag}} | |
{{end}}{{end}} | |
{{range $tag, $services := service "repoonec-80" | byTag}} | |
{{range $services}} | |
backend srvs_{{.Name}}{{$tag}} | |
balance first | |
server {{.ID}} {{.Address}}:{{.Port}} | |
{{end}}{{end}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment