Skip to content

Instantly share code, notes, and snippets.

@tcoupin
Last active May 29, 2020 07:26
Show Gist options
  • Save tcoupin/31bb38d1c02c501810e5 to your computer and use it in GitHub Desktop.
Save tcoupin/31bb38d1c02c501810e5 to your computer and use it in GitHub Desktop.
frontend http-in-ext
bind 0.0.0.0:80
bind 0.0.0.0:443 ssl crt /SSL/yourcert.pem
option forwardfor
reqrep (.*)/seamedia/(.*) \1/seahub/seamedia/\2
acl path_seahub path_beg /seahub
acl path_seafile path_beg /seafhttp
#Force https
redirect scheme https if path_seahub !{ ssl_fc }
redirect scheme https if path_seafile !{ ssl_fc }
use_backend seahub if path_seahub
use_backend seafile if path_seafile
backend seahub
server pi1 pi1:8000 check
backend seafile
reqrep (.*)/seafhttp/(.*) \1/\2
server pi1 pi1:8082 check
@tcoupin
Copy link
Author

tcoupin commented Feb 15, 2016

seafile is hosted on pi1, with port 8000 for seahub and 8082 for seafile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment