Files
invidious/etc/haproxy/haproxy.cfg
T
2025-06-18 11:31:14 +02:00

68 lines
1.9 KiB
INI

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
maxconn 4000
daemon
defaults
log global
mode http
option httplog
option dontlognull
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 502 /etc/haproxy/errors/502-invidious.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
timeout connect 10s
timeout check 10s
timeout client 15s
timeout server 15s
timeout http-request 30s
frontend statistics
bind :::8404 v4v6
mode http
http-request use-service prometheus-exporter if { path /metrics }
stats enable
stats uri /stats
stats refresh 30s
no log
frontend invidious
bind 192.42.6.1:8118
mode http
default_backend invidious_proxy
backend invidious_proxy
mode http
cookie COMPANION_ID insert indirect nocache httponly secure
balance leastconn
#balance hdr(X-Forwarded-For)
hash-type consistent
retry-on all-retryable-errors
# Ipv6
server proxy_1 192.42.6.11:8282 cookie 0
server proxy_2 192.42.6.12:8282 cookie 1
server proxy_3 192.42.6.13:8282 cookie 2
server proxy_4 192.42.6.14:8282 cookie 3
server proxy_5 192.42.6.15:8282 cookie 4
server proxy_6 192.42.6.16:8282 cookie 5
server proxy_7 192.42.6.17:8282 cookie 6
server proxy_8 192.42.6.18:8282 cookie 7
# IPv4
#server proxy_1 192.42.6.200:8282 cookie 10
#server proxy_2 192.42.6.201:8282 cookie 11