2020-10-31 15:34:48 +00:00
|
|
|
global
|
2021-06-25 18:28:09 +00:00
|
|
|
maxconn 2048
|
|
|
|
maxconnrate 40
|
|
|
|
|
|
|
|
log 127.0.0.1:514 local0 info
|
|
|
|
|
2020-10-31 15:34:48 +00:00
|
|
|
defaults
|
2021-06-25 18:28:09 +00:00
|
|
|
mode http
|
|
|
|
|
|
|
|
log global
|
|
|
|
|
|
|
|
retries 3
|
|
|
|
|
|
|
|
option forwardfor
|
|
|
|
option http-keep-alive
|
|
|
|
option httplog
|
|
|
|
option tcp-smart-connect
|
|
|
|
option tcpka
|
|
|
|
option abortonclose
|
|
|
|
|
|
|
|
balance roundrobin
|
|
|
|
|
|
|
|
compression algo gzip
|
|
|
|
|
|
|
|
timeout http-request 10s
|
|
|
|
timeout connect 10s
|
|
|
|
timeout client 60s
|
|
|
|
timeout server 240s
|
|
|
|
timeout http-keep-alive 240s
|
|
|
|
|
|
|
|
default-server resolvers local init-addr libc,none resolve-opts prevent-dup-ip check
|
|
|
|
|
|
|
|
errorfile 400 /etc/redxen/haproxy/errorpages/400.http
|
|
|
|
errorfile 403 /etc/redxen/haproxy/errorpages/403.http
|
|
|
|
errorfile 408 /etc/redxen/haproxy/errorpages/408.http
|
|
|
|
errorfile 500 /etc/redxen/haproxy/errorpages/500.http
|
|
|
|
errorfile 502 /etc/redxen/haproxy/errorpages/502.http
|
|
|
|
errorfile 503 /etc/redxen/haproxy/errorpages/503.http
|
|
|
|
errorfile 504 /etc/redxen/haproxy/errorpages/504.http
|
2020-10-31 15:34:48 +00:00
|
|
|
|
|
|
|
resolvers local
|
2021-06-25 18:28:09 +00:00
|
|
|
nameserver unbound 127.0.0.1:53
|
|
|
|
|
|
|
|
resolve_retries 2
|
|
|
|
|
|
|
|
timeout retry 300ms
|
|
|
|
|
|
|
|
hold other 100ms
|
|
|
|
hold refused 100ms
|
|
|
|
hold nx 100ms
|
|
|
|
hold timeout 3s
|
|
|
|
hold valid 60s
|
2020-10-31 15:34:48 +00:00
|
|
|
|
2020-12-22 22:14:01 +00:00
|
|
|
listen git-gitea
|
2021-06-25 18:28:09 +00:00
|
|
|
mode tcp
|
|
|
|
bind ipv4@*:2442,ipv6@*:2442
|
|
|
|
option tcp-check
|
|
|
|
server-template gitssh 1 _gitssh._tcp.routinginfo.internal
|
2020-12-22 22:14:01 +00:00
|
|
|
|
2022-02-19 16:12:44 +00:00
|
|
|
frontend metrics
|
|
|
|
mode http
|
|
|
|
bind ipv4@:7581,ipv6@:7581
|
|
|
|
|
|
|
|
http-request use-service prometheus-exporter if { path /metrics }
|
|
|
|
|
2020-10-31 15:34:48 +00:00
|
|
|
frontend http
|
2021-06-25 18:28:09 +00:00
|
|
|
mode http
|
|
|
|
bind ipv4@:443,ipv6@:443 ssl crt /etc/redxen/letsencrypt/full.crt alpn h2,http/1.1
|
|
|
|
bind ipv4@:80,ipv6@:80
|
|
|
|
|
|
|
|
http-response set-header X-Forwarded-Proto https
|
|
|
|
http-response set-header X-XSS-Protection 1;\ mode=block
|
|
|
|
http-response set-header X-Content-Type-Options nosniff
|
|
|
|
http-response set-header Referrer-Policy no-referrer-when-downgrade
|
|
|
|
http-response set-header Strict-Transport-Security max-age=31536000;\ includeSubDomains;\ preload
|
|
|
|
|
2021-08-04 17:00:05 +00:00
|
|
|
acl root path /
|
|
|
|
|
2021-08-05 11:07:24 +00:00
|
|
|
acl home hdr_beg(host) -i redxen
|
2021-08-04 17:00:05 +00:00
|
|
|
acl stats hdr_beg(host) -i stats.redxen
|
|
|
|
acl fedi hdr_beg(host) -i social.redxen
|
|
|
|
acl git hdr_beg(host) -i git.redxen
|
|
|
|
acl btdown hdr_beg(host) -i sd.redxen
|
|
|
|
acl btdaemon hdr_beg(host) -i seed.redxen
|
|
|
|
acl packs hdr_beg(host) -i packages.redxen
|
|
|
|
acl monerod hdr_beg(host) -i monerod.redxen
|
|
|
|
|
|
|
|
redirect location https://en.uncyclopedia.co/wiki/South_Africa code 302 if fedi
|
|
|
|
redirect prefix /web code 302 if btdaemon root
|
|
|
|
|
2021-08-05 11:07:24 +00:00
|
|
|
use_backend backend-home if home
|
2021-08-04 17:00:05 +00:00
|
|
|
use_backend backend-stats if stats
|
|
|
|
#use_backend backend-fedi if fedi
|
|
|
|
use_backend backend-git if git
|
|
|
|
use_backend backend-btdown if btdown
|
|
|
|
use_backend backend-btdaemon if btdaemon
|
|
|
|
use_backend backend-packages if packs
|
|
|
|
#use_backend backend-monerod if monerod
|
2021-06-25 18:28:09 +00:00
|
|
|
|
2021-08-05 11:07:24 +00:00
|
|
|
backend backend-home
|
2021-06-25 18:28:09 +00:00
|
|
|
server-template root 1 _root._tcp.routinginfo.internal
|
|
|
|
option httpchk HEAD / HTTP/1.1
|
|
|
|
http-check send hdr Host redxen.eu
|
|
|
|
|
2021-08-04 17:00:05 +00:00
|
|
|
backend backend-stats
|
2021-08-27 21:49:50 +00:00
|
|
|
server-template grafana 2 _grafana._tcp.routinginfo.internal
|
2021-06-25 18:28:09 +00:00
|
|
|
option httpchk HEAD / HTTP/1.1
|
|
|
|
http-check send hdr Host stats.redxen.eu
|
|
|
|
|
2021-08-04 17:00:05 +00:00
|
|
|
#backend backend-fedi
|
|
|
|
# server-template pleroma 1 _pleroma._tcp.routinginfo.internal
|
|
|
|
# option httpchk HEAD / HTTP/1.1
|
|
|
|
# http-check send hdr Host social.redxen.eu
|
|
|
|
|
|
|
|
backend backend-git
|
|
|
|
server-template gitea 1 _gitea._tcp.routinginfo.internal
|
|
|
|
option httpchk HEAD / HTTP/1.1
|
|
|
|
http-check send hdr Host gitea.redxen.eu
|
|
|
|
|
|
|
|
backend backend-btdown
|
2021-06-25 18:28:09 +00:00
|
|
|
server-template seedown 1 _seedown._tcp.routinginfo.internal
|
|
|
|
option httpchk HEAD / HTTP/1.1
|
|
|
|
http-check send hdr Host sd.redxen.eu
|
|
|
|
|
2021-08-04 17:00:05 +00:00
|
|
|
backend backend-btdaemon
|
|
|
|
server-template transmission 1 _transmission._tcp.routinginfo.internal
|
|
|
|
|
2021-06-25 18:28:09 +00:00
|
|
|
backend backend-packages
|
|
|
|
server-template packages 1 _packages._tcp.routinginfo.internal
|
|
|
|
option httpchk HEAD / HTTP/1.1
|
|
|
|
http-check send hdr Host packages.redxen.eu
|
|
|
|
|
|
|
|
#backend backend-monerod
|
|
|
|
# server-template monerod 1 _monerod._tcp.routinginfo.internal
|
|
|
|
# option httpchk POST /json_rpc HTTP/1.1
|
|
|
|
# http-check send body \{\"method\"\:\"get_version\"\} hdr Content-Type application/json
|