Trouble Running Seahub behind Apache

I’m interested in running Seafile behind Apache, but not so that Seahub is served out of the root domain - I.E. instead of going to, I’d like to go to to access Seahub.

I thought it might be as simple as changing the ProxyPass directive in the Apache instructions, but that does’t seem to work. When I try to access Seahub, I receive an error message: Sorry, but the requested page could not be found.

And in seahub_django_request.log, I see:
[WARNING] django.request:170 get_response Not Found: /seafile//

Clearly, I’m not doing something right. What can I do to correct this?

Did you also change the seafile root url in the seafile configuration file?

I believe I’ve made all necessary config changes.

My ccnet.conf has SERVICE_URL =

My has SITE_ROOT = '/seafile' and FILE_SERVER_ROOT=

You should paste the part of your apache config for seafile server.

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

USER_NAME = seafile

port = 8082
MEDIA_URL = ‘/seafile/media/’
STATIC_URL = MEDIA_URL + ‘assets/’
SITE_ROOT = ‘/seafile/’
LOGIN_URL = ‘/seafile/accounts/login/’ # NOTE: since version 5.0.4


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

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

# seafile fileserver
ProxyPass /seafilehttp
ProxyPassReverse /seafilehttp
RewriteRule ^/seafilehttp - [QSA,L]

ProxyPass /seafhttp
ProxyPassReverse /seafhttp
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://
1 Like

What i have forgotten: seahub must be stated as fastcgi, like:

sudo -u seafile ./ start-fastcgi

@markusweb That did it! Thank you so much for posting your example. I’m finally free of ownCloud! :slight_smile: