Question

How to configure seafile on ubuntu20.04 with apache

I am tring to use seafile and I was following https://www.digitalocean.com/community/tutorials/how-to-sync-and-share-your-files-with-seafile-on-ubuntu-20-04 to install it. But when I open my domain, I got only “It works” page of apache. I think may be wrong document root in apache conf cause this problem, because there is nothing about seafile in /var/www, and there is nothing mentioned about /var/www in tutorial. I put all seafile files in /home/hamburger/seafile. I don`t know how to solve it, hope to get any help from you. Here is my seafile.conf of apache

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName www.mydomain
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/mydomain-error.log
    CustomLog ${APACHE_LOG_DIR}/mydomain-access.log combined

    SSLEngine On
    SSLCertificateFile /home/hamburger/seafileCacert.pem
    SSLCertificateKeyFile /home/hamburger/seafile.pem

    Alias /media  /home/hamburger/seafile/seafile-server-latest/seahub/media
    <Location /media>
        Require all granted
    </Location>

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

    # seahub web interface
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    ProxyPass / http://127.0.0.1:8000/
    ProxyPassReverse / http://127.0.0.1:8000/
</VirtualHost>
</IfModule>
~

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @jxk0901,

Is your seafile service started? Everything seems okay in the configuration file.

Additionally, did you run the following command:

sudo a2enmod proxy_http

I can only see the following option to be missing:

    Include /etc/letsencrypt/options-ssl-apache.conf

from the conf, but it shouldn’t be that much of a problem.