Some troubles with downloading files from Webinterface/iOS

Hello everyone,

I have some troubles with Seafile 7.0.4 on my Raspberry Pi 3. Seafile works flawless, execpt when I’m trying to Downoad files over the Webinterface or the iOS app.

When I try to download a file (http ://192.168.178.41:8000/seafhttp/files/3406be0a-3d9b-4b3e-9a75-a7923cfc25b0/seafile-tutorial.doc) Seafile displays:

Sorry, but the requested page could not be found.

I really tried hours to fix it but I don’t get it working. I think it is just a small configuration error. I hope someone can help me :grinning:

Seafile runs on Port :8000 over apache2, Port :80 is used by Baikal. I only want to accses Seafile over my local LAN.

/etc/apache2/sites-enabled/000-default.conf:

<VirtualHost *:80>
ServerName 192.168.178.41
ServerAdmin webmaster@localhost
DocumentRoot /var/www/baikal/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    #CustomLog ${APACHE_LOG_DIR}/access.log combined
    RewriteEngine on
    RewriteRule /.well-known/carddav /dav.php [R,L]
    RewriteRule /.well-known/caldav /dav.php [R,L]
    #RewriteCond %{SERVER_NAME} =192.168.178.41
    #RewriteRule ^ http://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    
    <Directory "/var/www/baikal/html">
    Options None
    Options +FollowSymlinks
    AllowOverride All

    # Confiugration for apache-2.4:
    Require all granted
    </Directory>

<VirtualHost *:8000>
ServerName 192.168.178.41
DocumentRoot /var/www
Alias /media /home/user/haiwen/seafile-server-latest/seahub/media

    RewriteEngine On

    <Location /media>
    Require all granted
    </Location>

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

    # seahub
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:8000/
    ProxyPassReverse / http://127.0.0.1:8000/

/home/seafile/conf/seahub_settings.py:

SECRET_KEY = “…”

FILE_SERVER_ROOT = ‘http ://192.168.178.41/seafhttp’

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘seahub-db’,
‘USER’: ‘…’,
‘PASSWORD’: ‘…’,
‘HOST’: ‘127.0.0.1’,
‘PORT’: ‘3306’
}
}

/home/seafile/conf/seahub_settings.py:

[General]
USER_NAME = seafile
ID = …
NAME = seafile
SERVICE_URL = h_ttp://192.168.178.41:8000 [means http in config]

[Client]
PORT = 13419

[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = …
PASSWD = …
DB = ccnet-db
CONNECTION_CHARSET = utf8

  1. You can’t give your server an IP as Server Name. You have to give the server a clear FQDN. In fact you using the server locally you just have to give the server a hostname like raspi. So you have to put that hostname in the ServerName var. But you can keep the IP’s in the seafile config files.

  2. I think it’s also impossible to proxyfy seafile trought apache like in your config. You should do it like in the documentary. Try to copy the Alias and the other line into the Port 80 virtual host section. I think there’s a conflict between apache and seafile in the actual config situation.

I used a fresh Apache-Conf (no more Baikal on port 80):

etc/apache2/sites-enable/000-default.conf

    <VirtualHost *:80>
    ServerName raspi
    ServerAdmin webmaster@localhost
   
    DocumentRoot /var/www

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

    RewriteEngine On

    <Location /media>
    Require all granted
    </Location>

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

    # seahub
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:8000/
    ProxyPassReverse / http://127.0.0.1:8000/
    </VirtualHost>
  1. /home/seafile/seafile-server-latest/seahub/media is correct

  2. Sync and client app are working, but downloading the files still does not work.

I can see the download button under

ht_p://192.168.178.41/lib/…/file/seafile-tutorial.doc

but when I’m trying to download the file

h__p://192.168.178.41:8000/seafhttp/files/…/seafile-tutorial.doc

i still get “Sorry, but the requested page could not be found.”

Here is my seahub.log:

2019-08-16 20:13:02,108 [WARNING] django.request:152 get_response Not Found: /favicon.ico
2019-08-16 20:20:09,744 [WARNING] django.request:152 get_response Not Found: /seafhttp/files//test
2019-08-16 20:23:36,111 [WARNING] django.request:152 get_response Not Found: /seafhttp/files/…/seafile-tutorial.doc
2019-08-16 20:23:37,918 [WARNING] django.request:152 get_response Not Found: /favicon.ico
2019-08-16 20:24:26,168 [WARNING] django.request:152 get_response Not Found: /seafhttp/files/…/seafile-tutorial.doc

btw:
I think the link to seafhttp is the problem. When I try to open

h__p://192.168.178.41:8000/seafhttp

I get “Sorry, but the requested page could not be found.” again.

nobody? ¯_(ツ)_/¯

solved it - bye

Hello bab00n,

I got the same error and unfortunately you solved is with the response "- bye " .
Are you able to share what you changed?

Kr