Unable to login to apps with server using non root domain and reverse proxy

I am trying to use Seafile under a non root domain, as described in the manual, but also behind a Nginix reverse proxy.

I have this working via web and can access via SSL but when I try and use the address in any app (MacOS and iOS tried so far) the client is unable to login (“Failed to Login”).

Server version is seafile-server-7.0.4

The error I get in applet.log is:

09/06/19 22:32:21]ServerStatusService: ignore request for host "mydomain.ddns"

[09/06/19 22:32:21]request failed for https://mydomain.ddns.net/seafile/api2/auth-token/:

404 Not Found

404 Not Found


nginx/1.14.1

[09/06/19 22:32:22]Failed to login

My Nginx config:

location /seafile {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto https;
proxy_read_timeout 1200s;

     client_max_body_size 0;

     access_log      /var/log/nginx/seahub.access.log;
     error_log       /var/log/nginx/seahub.error.log;
}

location /seafhttp {
    rewrite ^/seafhttp(.*)$ $1 break;
    proxy_pass http://127.0.0.1:8082;
    client_max_body_size 0;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_connect_timeout  36000s;
    proxy_read_timeout  36000s;
    proxy_send_timeout  36000s;
    send_timeout  36000s;

}

location /seafmedia {
    rewrite ^/seafmedia(.*)$ /media$1 break;
    root /opt/seafile-server/seafile-server-latest/seahub;
}

My ccnet.conf:

[General]

USER_NAME = Removed

ID = Removed

NAME = Removed

SERVICE_URL = https://mydomain.ddns.net/seafile

[Client]

PORT = 13419

[Database]

ENGINE = mysql

HOST = 127.0.0.1

PORT = 3306

USER = secret

PASSWD = secret

DB = ccnet

CONNECTION_CHARSET = utf8

My seahub_settings:

SERVE_STATIC = False

MEDIA_URL = ‘/seafmedia/’

COMPRESS_URL = MEDIA_URL

STATIC_URL = MEDIA_URL + ‘assets/’

SITE_ROOT = ‘/seafile/’

LOGIN_URL = ‘/seafile/accounts/login/’ # NOTE: since version 5.0.4

FILE_SERVER_ROOT = ‘https://mydomain.ddns.net/seafhttp

TIME_ZONE = ‘GB’

Any help much appreicated!