mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-08 17:48:44 +00:00
* Add HAProxy docs * Add changes to Changelog * Add CodeBlock import to haproxy.mdc * Fix typos * Add exceptions to spelling
23 lines
708 B
INI
23 lines
708 B
INI
# /etc/haproxy/haproxy.cfg
|
|
|
|
frontend FE-application
|
|
mode http
|
|
bind :80
|
|
# ssl offloading on port 443 using a certificate from /etc/haproxy/ssl/ directory
|
|
bind :443 ssl crt /etc/haproxy/ssl/ alpn h2,http/1.1 ssl-min-ver TLSv1.2 no-tls-tickets
|
|
|
|
# set X-Real-IP header required for Anubis
|
|
http-request set-header X-Real-IP "%[src]"
|
|
|
|
# redirect HTTP to HTTPS
|
|
http-request redirect scheme https code 301 unless { ssl_fc }
|
|
# add HSTS header
|
|
http-response set-header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
|
|
|
# route to Anubis backend by default
|
|
default_backend BE-anubis-application
|
|
|
|
BE-anubis-application
|
|
mode http
|
|
server anubis /run/anubis/default.sock
|