Files
ansible-collection/roles/haproxy/templates/liqueur/haproxy.cfg.j2
T
2026-10-02 21:34:01 +04:00

86 lines
2.3 KiB
Django/Jinja

global
log /dev/log local2
chroot /var/lib/haproxy
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats mode 660 level admin
defaults
log global
mode tcp
option tcplog
option dontlognull
retries 3
timeout connect 5s
timeout client 1h
timeout server 1h
timeout check 10s
frontend http_frontend
bind 127.0.0.1:10080 accept-proxy
mode http
option httplog
acl host_dttx hdr_end(host) -m end dttx.ru
use_backend dttx_http_srv if host_dttx
default_backend oyacoi_http_srv
backend oyacoi_http_srv
mode http
server oyacoi_srv {{ hostvars['nginx']['ip'] }}:81 send-proxy-v2
backend dttx_http_srv
mode http
server dttx_srv {{ hostvars['rbpi4']['ip'] }}:81 send-proxy-v2
frontend https_frontend
bind 127.0.0.1:10443 accept-proxy
mode tcp
option tcplog
tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }
acl host_dttx req_ssl_sni -m end dttx.ru
acl host_telemt req_ssl_sni -m end regionculture.ru
use_backend dttx_https_srv if host_dttx
use_backend telemt_https_srv if host_telemt
default_backend oyacoi_https_srv
backend oyacoi_https_srv
mode tcp
server nginx_srv {{ hostvars['nginx']['ip'] }}:444 send-proxy-v2
backend dttx_https_srv
mode tcp
server dttx_srv {{ hostvars['rbpi4']['ip'] }}:444 send-proxy-v2
backend telemt_https_srv
mode tcp
option tcp-check
server telemt_srv {{ hostvars['vector']['ip'] }}:443 check
server telemt_srv_backup {{ hostvars['dev']['ip'] }}:443 check backup
listen xmpp_c2s
bind {{ hostvars['liqueur']['ip'] }}:5222
server prosody_srv {{ hostvars['prosody']['ip'] }}:5222
listen xmpp_legacy_ssl
bind {{ hostvars['liqueur']['ip'] }}:5223
server prosody_srv {{ hostvars['prosody']['ip'] }}:5223
listen xmpp_s2s
bind {{ hostvars['liqueur']['ip'] }}:5269
server prosody_srv {{ hostvars['prosody']['ip'] }}:5269
listen prosody_proxy65
bind {{ hostvars['liqueur']['ip'] }}:5000
server prosody_srv {{ hostvars['prosody']['ip'] }}:5000
listen prosody_components
bind {{ hostvars['liqueur']['ip'] }}:5270
server prosody_srv {{ hostvars['prosody']['ip'] }}:5270
listen prosody_bosh_http
bind {{ hostvars['liqueur']['ip'] }}:5280
server prosody_srv {{ hostvars['prosody']['ip'] }}:5280