Skip to content

Instantly share code, notes, and snippets.

@aburan28
Created April 3, 2018 14:37
Show Gist options
  • Save aburan28/5c5f31b12fd4651cfb7dd958654ba209 to your computer and use it in GitHub Desktop.
Save aburan28/5c5f31b12fd4651cfb7dd958654ba209 to your computer and use it in GitHub Desktop.
ssl-default-bind-options no-sslv3
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
ssl-default-server-options no-sslv3
global
pidfile /var/run/haproxy.pid
tune.ssl.default-dh-param 2048
log 127.0.0.1:1514 local0
# disable sslv3, prefer modern ciphers
ssl-default-bind-options no-sslv3
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
ssl-default-server-options no-sslv3
ssl-default-server-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
resolvers docker
nameserver dns 127.0.0.11:53
defaults
mode http
balance roundrobin
option http-keep-alive
option forwardfor
option redispatch
errorfile 400 /errorfiles/400.http
errorfile 403 /errorfiles/403.http
errorfile 405 /errorfiles/405.http
errorfile 408 /errorfiles/408.http
errorfile 429 /errorfiles/429.http
errorfile 500 /errorfiles/500.http
errorfile 502 /errorfiles/502.http
errorfile 503 /errorfiles/503.http
errorfile 504 /errorfiles/504.http
maxconn 5000
timeout connect 5s
timeout client 20s
timeout server 20s
timeout queue 30s
timeout tunnel 3600s
timeout http-request 5s
timeout http-keep-alive 15s
frontend services
bind *:80
bind *:443
mode http
option httplog
log global
acl url_service15000 path_beg /service1
acl domain_service15000 hdr(host) -i domain.net
use_backend service1-be5000 if url_service15000 domain_service15000
acl url_service25000 path_beg /service2
acl domain_service25000 hdr(host) -i domain.net
use_backend service2-be5000 if url_service25000 domain_service25000
acl url_service35000 path_beg /service3
acl domain_service35000 hdr(host) -i domain.net
use_backend service3-be5000 if url_service35000 domain_service35000
acl url_service45000 path_beg /service4/
acl domain_service45000 hdr(host) -i domain.net
use_backend service4-be5000 if url_service45000 domain_service45000
backend service1-be5000
mode http
log global
http-request set-path %[path,regsub(/service1/?,/)]
server service1 service1:5000
backend service2-be5000
mode http
log global
http-request set-path %[path,regsub(/service2/?,/)]
server service2 service2:5000
backend service3-be5000
mode http
log global
server service3 service3:5000
backend service4-be5000
mode http
log global
server service4 service4:5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment