@ -39,7 +39,7 @@ frontend https-frontend
|
||||
# HAproxy wants the full chain and the private key in one file. For Letsencrypt manually generated certs (e.g., wildcard certs) you can use
|
||||
# cat /etc/letsencrypt/live/example.com/fullchain.pem /etc/letsencrypt/live/example.com/privkey.pem > /etc/haproxy/certs/star-example.com.pem
|
||||
bind *:443 ssl crt /etc/haproxy/certs/star-example.com.pem
|
||||
#bind *:443 ssl crt /etc/haproxy/certs/riot.example.com.pem /etc/haproxy/certs/matrix.example.com.pem
|
||||
#bind *:443 ssl crt /etc/haproxy/certs/element.example.com.pem /etc/haproxy/certs/matrix.example.com.pem
|
||||
reqadd X-Forwarded-Proto:\ https
|
||||
option httplog
|
||||
option http-server-close
|
||||
@ -60,10 +60,10 @@ frontend https-frontend
|
||||
acl synapse_admin path -i -m beg /_synapse/admin
|
||||
# Send to :8008
|
||||
use_backend matrix-main if matrix_path or synapse_admin
|
||||
# riot.example.com
|
||||
acl riot_domain hdr_dom(host) -i riot.example.com
|
||||
# element.example.com
|
||||
acl element_domain hdr_dom(host) -i element.example.com
|
||||
# Send to 8765
|
||||
use_backend riot if riot_domain
|
||||
use_backend element if element_domain
|
||||
# If nothing else match, just send to default matrix backend
|
||||
use_backend matrix-main if matrix_domain
|
||||
#default_backend matrix-main
|
||||
@ -86,12 +86,12 @@ backend synapse
|
||||
|
||||
backend nginx-static
|
||||
capture request header origin len 128
|
||||
http-response add-header Access-Control-Allow-Origin *
|
||||
http-response add-header Access-Control-Allow-Origin *
|
||||
rspadd Access-Control-Allow-Methods:\ GET,\ HEAD,\ OPTIONS,\ POST,\ PUT if { capture.req.hdr(0) -m found }
|
||||
rspadd Access-Control-Allow-Credentials:\ true if { capture.req.hdr(0) -m found }
|
||||
rspadd Access-Control-Allow-Headers:\ Origin,\ Accept,\ X-Requested-With,\ Content-Type,\ Access-Control-Request-Method,\ Access-Control-Request-Headers,\ Authorization if { capture.req.hdr(0) -m found }
|
||||
server nginx 127.0.0.1:40888 check
|
||||
|
||||
backend riot
|
||||
server riot 127.0.0.1:8765 check
|
||||
backend element
|
||||
server element 127.0.0.1:8765 check
|
||||
|
||||
|
Reference in New Issue
Block a user