How to configure seafile on ubuntu20.04 with apache

Posted November 11, 2021 51 views
MySQLApacheUbuntu 20.04

I am tring to use seafile and I was following [](http://) 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

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

    # seahub web interface
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    ProxyPass /
    ProxyPassReverse /

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.

Submit an Answer
1 answer

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.