22 lines
744 B
Plaintext
22 lines
744 B
Plaintext
# Merge with your existing TLS frontend; route by hostname, not URL path.
|
|
# Set FILES_PUBLIC_URL=files.note.example.com in RustPad.
|
|
# The example assumes the main site shares the same 443 frontend.
|
|
frontend https_front
|
|
bind *:443 ssl crt /etc/haproxy/certs/example.pem
|
|
mode http
|
|
acl files_host hdr(host) -i files.note.example.com
|
|
use_backend rustpad_files if files_host
|
|
default_backend rustpad_app
|
|
|
|
backend rustpad_files
|
|
mode http
|
|
option httpchk GET /health
|
|
http-check expect status 200
|
|
http-request set-header X-Forwarded-Proto https
|
|
server rustpad-files rustpad:3001 check
|
|
|
|
backend rustpad_app
|
|
mode http
|
|
http-request set-header X-Forwarded-Proto https
|
|
server rustpad-app rustpad:3000 check
|