Advertisement
svxvcer

Untitled

Jul 27th, 2023
1,217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.76 KB | None | 0 0
  1. global
  2.         log /dev/log    local0
  3.         log /dev/log    local1 notice
  4.         chroot /var/lib/haproxy
  5.         stats socket /run/haproxy/admin.sock mode 660 level admin
  6.         stats timeout 30s
  7.         user haproxy
  8.         group haproxy
  9.         daemon
  10.  
  11.         # Default SSL material locations
  12.         ca-base /etc/ssl/certs
  13.         crt-base /etc/ssl/private
  14.  
  15.         # See: https://ssl-config.mozilla.org/#server=haproxy&server-version=2.0.3&config=intermediate
  16.         ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-R>
  17.         ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
  18.         ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
  19.  
  20. defaults
  21.         log     global
  22.         mode    http
  23.         option  httplog
  24.         option  dontlognull
  25.         timeout connect 5000
  26.         timeout client  50000
  27.         timeout server  50000
  28.         errorfile 400 /etc/haproxy/errors/400.http
  29.         errorfile 403 /etc/haproxy/errors/403.http
  30.         errorfile 408 /etc/haproxy/errors/408.http
  31.         errorfile 500 /etc/haproxy/errors/500.http
  32.         errorfile 502 /etc/haproxy/errors/502.http
  33.         errorfile 503 /etc/haproxy/errors/503.http
  34.         errorfile 504 /etc/haproxy/errors/504.http
  35. #######################
  36. frontend http-https-in
  37. bind    192.168.0.2:80
  38. bind    192.168.0.2:443
  39.  
  40. use_backend http_nginx_pool    if !{ ssl_fc }
  41. use_backend https_nginx_pool   if { ssl_fc }
  42.  
  43. backend http_nginx_pool
  44.     mode http
  45.     server nginx2 192.168.0.36:80 check
  46.     server nginx2 192.168.0.46:80 check
  47.  
  48. backend https_nginx_pool
  49.     mode http
  50.     server nginx2 192.168.0.36:443 check
  51.     server nginx2 192.168.0.46:443 check   
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement