Sorry, but the requested page could not be found

Hello All,

Im working on the topic for a couple of days now and still get the mentioned “Sorry, but the requested page could not be found.” error.
Basicaly it is a fresh install Unbuntu server :
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic

With Apache2 and seafile-server-7.0.4

The seafile server synchronises as it should do, so that works pretty fine.
The web browser of seafile works as well. The only thing which does not work is downloading and uploading files. This via a web browser, but apps as well.

I really hope someone can help me. I did check numerous treads already but could not find a solution.

Hereby my apache config:

I tried to change the port to 9000 as well, but no luck.

============

<VirtualHost *:80>
    ServerName seafile.xxx.nl
    # Use "DocumentRoot /var/www/html" for Centos/Fedora
    # Use "DocumentRoot /var/www" for Ubuntu/Debian
    DocumentRoot /var/www
    Alias /media  /home/user/seafile/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/
</VirtualHost>

==================

No specific errors in my error.log and access.log

==================

The only error I could find was from seahub.logs

2019-10-21 13:16:12,847 [WARNING] django.request:152 get_response Not Found: /seafhttp/files/6b18e1b3-0bc7-4901-98c6-45f81e2ca690/Safari - 1 jan. 2019 12:05.pdf

==================
CCNET.CONF

    CCNET.conf
[General]
USER_NAME = seafile
ID = fXXXXXX
NAME = seafile
SERVICE_URL = http://seafile.xxx.nl:9000

[Client]
PORT = 13419

[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = XXX
PASSWD = XXX
DB = ccnetdb
CONNECTION_CHARSET = utf8

=====================

    # -*- coding: utf-8 -*-
SECRET_KEY = "xxxxx"
FILE_SERVER_ROOT = 'http:/seafile.xxx.nl/seafhttp'

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'seahubdb',
        'USER': 'xx',
        'PASSWORD': 'xx',
        'HOST': '127.0.0.1',
        'PORT': '3306'
    }
}

I really hope someone can spot the error.

Hey esorone,

could you please post the output of a “netstat -tulpn”. Is there an entry that looks like 127.0.0.1:8000 of 0.0.0.0:8000?

image

If there is such an entry seahub please try:
curl http://127.0.0.1:8000/api2/ping/
(dont forget the / at the end). The result should be a “pong”.
If that is the case seahub is running and there is something wrong with your apache.

If there is no such entry, seahub is not started or it is not listening on port 8000. Check the /conf/gunicorn.conf.

Best regards
Christoph

I have similar issue when upload file before… but your service ports makes me confused.

your apache is listen on 80 – no issue
seafilehttp listen on 8082
seahub on 8000
—below all from your apache setting—
I use default port 8000 in my ccnet.conf file why you try 9000?
[root@app01 conf]# cat ccnet.conf
[General]
USER_NAME = app01
ID = xxxxx15a82f
NAME = app01
SERVICE_URL = http://localhost:8000

my gunicorn.conf used
bind = “0.0.0.0:8000”

with this kind of ports my nginx is working fine.

Hello Christoph,
Sorry for my late notice. Unfortunately I did not find the time to respond sooner.

Here by my results of netstat -tulpn

I have
0.0.0:8082
0.0.0.0:9000
0.0.0.0:8080

So no 8000

After this I changed the CCNET.conf to port 8000
and changed gunicorn.conf to 8000 as well.
Both were on 9000.

After restarting Seafile and apache I got the 0.0.0.0:8000 and when I did the curl http://127.0.0.1:8000/api2/ping/ I receive PONG.

I checked Apache but I could not find anything, but when I download a file, the download url still point to port 9000.

The “Online view is not applicable to this file format” is on port 8000, but the download link port is on 9000

Any idea left?

Hello Graywen,

I forget to answer your reply. The reason that I would like to have 9000, was that the port was already in use for an other application. But this isn’t the case anymore, therefor I was able to get back to port 8000. Unfortunately I still did not get it working.

Maybe an idea left?

how about you gunicorn.conf file… i follow the document and see if you want to change port also need to change here:
mine config as below:

cat gunicorn.conf

import os
daemon = True
workers = 5

default localhost:8000

#bind = “127.0.0.1:8000”
bind = “0.0.0.0:8000”

Hey Graywen24,
Thanks for you reply.

This is my gunicorn.conf:
import os
daemon = True
workers = 5

#default localhost:8000
bind = “0.0.0.0:8000”

So it looks like the same.

Any other ideas?

btw: after the changes above, the following error message shows up in the logs:
[WARNING] django.request:152 get_response Not Found: /seafhttp/files/2124118e-cc1c-46ba-b171-342eabe142f5/Safari - 1 jan. 2019 12:05.pdf

Hi,
just notice this reply. hmm ya…i am busy to reinstall new verison seafile…so i also encountered a lot of not found error after configure all the nginx and seafile…

your error log i have the same one… i troubleshoot a lot of times…and fianlly i am able to make it work just to edit the web setting.
i read the manual it mentioned here will overwrite the server conf…
so here if you configure wrongly will always have various kind of error.
could you share your setting from web?