Created
April 3, 2022 21:32
-
-
Save jeremylowery/1414ab0242be3b0ddbccf813c578c3cf to your computer and use it in GitHub Desktop.
haproxy configuration for seafile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend seaweb | |
bind 0.0.0.0:80 | |
bind 0.0.0.0:443 ssl crt /etc/haproxy/certs/ alpn h2,http/1.1 | |
mode http | |
## Force to HTTPS | |
http-request redirect scheme https unless { ssl_fc } | |
http-request set-header X-Forwarded-Proto https | |
http-request set-header X-Forwarded-Host %[req.hdr(Host)] | |
http-request set-header X-Real-IP %[src] | |
use_backend seafile_http if { path_beg -i /seafhttp } | |
use_backend seahub_http | |
backend seafile_http | |
mode http | |
http-request replace-uri ^/seafhttp/(.*) /\1 | |
option forwardfor | |
server seafileserver 10.10.10.10:8082 | |
backend seahub_http | |
mode http | |
option forwardfor | |
server seafileserver 10.10.10.10:8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment