Trouble Running Seahub behind Apache

Here is my working config.
apache 2.4 with ssl enabled, seafile pro server 6.0.2:

ccnet.conf
[General]
USER_NAME = seafile
SERVICE_URL = https://www.example.com/seafile

seafile.conf
[fileserver]
port = 8082

seahub_settings.py
SERVE_STATIC = False
MEDIA_URL = ‘/seafile/media/’
COMPRESS_URL = MEDIA_URL
STATIC_URL = MEDIA_URL + ‘assets/’
SITE_ROOT = ‘/seafile/’
LOGIN_URL = ‘/seafile/accounts/login/’ # NOTE: since version 5.0.4
FILE_SERVER_ROOT = ‘https://www.example.com/seafilehttp

apache.conf

Alias /seafile/media  /home/seafile/seafile-server-latest/seahub/media
RewriteEngine On

<Location /seafile/media>
    ProxyPass !
    Require all granted
</Location>

# seafile fileserver
#
ProxyPass /seafilehttp http://127.0.0.1:8082
ProxyPassReverse /seafilehttp http://127.0.0.1:8082
RewriteRule ^/seafilehttp - [QSA,L]

ProxyPass /seafhttp http://127.0.0.1:8082
ProxyPassReverse /seafhttp http://127.0.0.1:8082
RewriteRule ^/seafhttp - [QSA,L]
#
# seahub
#


RewriteRule ^/seafile$ /seafile/ [L,R=301]
SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
ProxyPass /seafile fcgi://127.0.0.1:8000/seafile
1 Like