My Seafile instance is running on a dedicated webserver behind a reverse proxy which is handling the SSL encryption.

This setup with the protocol change on one of the webservers does not work out of the box / this case is not documented in the official server documentation.

My setup:

INTERNET <--( HTTPS )--> Apache Reverse Proxy <--( HTTP )--> Apache Webserver <-- (FCGI) --> Seafile

In the configuration of the reverse proxy, it's important to set a header for the original protocol:

ProxyPreserveHost On
ProxyVia Block

RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
ProxyPass / http://my-internal-seafile-webserver/
ProxyPassReverse / http://my-internal-seafile-webserver/

The regular seafile webserver is configured as written in the official server manual:

In the seafile configuration the external hostname is configured:


SERVICE_URL = https://my-public-seafile-domain/


FILE_SERVER_ROOT = 'https://my-public-seafile-domain/seafhttp'
HTTP_SERVER_ROOT = 'https://my-public-seafile-domain/';

# Setup support for proxy headers

Without these settings, the links generated in the webfronted are sometimes wrong (wrong hostname and/or protocol).