I’m trying to deploy Seafile behind an Apache reverse proxy while Seafile and Apache are installed on different servers. (on the same LAN)
Seafile would be hosted on mydomain.com/seafile
Until now I’ve had these installed on the same server for a few years and everything worked fine.
I think I’ve almost got it working but there is still one problem. Whenever I open the Seafile page in my browser the CSS is not loaded. The page then looks like this:
I think this is because of the following line in my apache config:
Alias /seafmedia /home/seafile/seafile-server-latest/seahub/media
Since the Seafile installation is not on that server anymore, Apache won’t be able to read that directory.
So I was wondering if it is possible to also proxy this directory to the other server.
Any help would be appreciated.
Here is the rest of my Apache config:
<VirtualHost *:443> Alias /seafmedia /home/seafile/seafile-server-latest/seahub/media RewriteEngine On <Location /seafmedia> ProxyPass ! Require all granted </Location> # seafile fileserver ProxyPass /seafhttp http://xx.xx.xx.xx:8082 ProxyPassReverse /seafhttp http://xx.xx.xx.xx:8082 RewriteRule ^/seafhttp - [QSA,L] # seahub SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 ProxyPreserveHost On ProxyPass /seafile http://xx.xx.xx.xx:8000/seafile ProxyPassReverse /seafile http://xx.xx.xx.xx:8000/seafile </VirtualHost>