Skip to content

Instantly share code, notes, and snippets.

@fackux
Created April 4, 2022 19:23
Show Gist options
  • Select an option

  • Save fackux/b95301bfeb3465cf61bd5324498d5253 to your computer and use it in GitHub Desktop.

Select an option

Save fackux/b95301bfeb3465cf61bd5324498d5253 to your computer and use it in GitHub Desktop.
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
# Default SSL material locations
ca-base /etc/ssl/certs
# crt-base /etc/ssl/private
crt-base /etc/haproxy/crt
# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL). This list is from:
# https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 500000
timeout client 5000000
timeout server 5000000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend fe-local
bind *:80
bind *:443 ssl crt zonaprop.com.ar.pem
reqadd secureNavent:\ YES if { ssl_fc }
option forwardfor
default_backend backend_bumex
acl acl_ficha path_reg ^/(propiedades|propriedades|posting|rpfic-api|rp-api)/*
acl acl_print path_reg ^/(propiedades|propriedades)/imprimir/*
acl acl_alt path_reg ^/alt/*
acl acl_listado path_reg ^/(listado\.bum(\?.*)?|.*\.html|rplis-api*|listado/*)
acl acl_listado_urb path_beg -i /buscar
acl acl_listado_urb path_beg -i /mapas
acl acl_home path -i /
acl acl_home path_beg -i /home
acl acl_home path_reg ^/(rphom-utils|rphom-api)/*
acl acl_listado_inmobiliarias path_reg ^/inmobiliarias.*
acl acl_home path_reg ^/(emprendimientos|lancamentos|desarrollos|proyectos|lancamentos-distrito-federal-goias)?/
default_backend backend_bumex
use_backend backend_bumex if acl_print
use_backend backend_ficha if acl_ficha
use_backend backend_listado if acl_listado !acl_ficha || acl_listado_inmobiliarias
use_backend backend_listado if acl_listado_urb
use_backend backend_home if acl_home
backend backend_bumex
server bumex_local 127.0.0.1:8080
backend backend_ficha
server ficha_local 127.0.0.1:8090
backend backend_listado
server listado_local 127.0.0.1:8091
backend backend_home
server home_local 127.0.0.1:8092
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment