No login for Nextcloud

Team,

I’m using lsio containers swag and nextcloud.
When I activate swag, there is no login-prompt from nextcloud - it is always redirected to /apps/files.

I tried nextcloud without swag and it is working as expected.

The external url for the nextcloud instance is htpps://nc.itv360.net/ and running via Cloudflare (dns-only).
The internal url is nc.tech.lan (alias) or logos.tech.lan (actual host). I used nc.tech.lan for the swag config. Using logos.tech.lan (the actual host for the nextcloud container) makes no difference.

The host for swag is called morpheus.tech.lan.

Below the config files from nextcloud and swag (i.e. subdomain and subfolder).

Anyone an idea what could be wrong? Or where to start troubleshooting?

‘trusted_domains’ =>
array (
0 => ‘nc.tech.lan’,
1 => ‘nc.itv360.net’,
2 => ‘logos.tech.lan’,
),
‘trusted_proxies’ =>
array (
0 => ‘192.168.139.235/32’,
1 => ‘morpheus.tech.lan’,
),
‘overwrite.cli.url’ => ‘https://nc.itv360.net’,
‘overwritehost’ => ‘nc.itv360.net’,
‘overwriteprotocol’ => ‘https’,

server {
listen 443 ssl;

server_name nc.itv360.net;

include /config/nginx/ssl.conf;

client_max_body_size 0;


location / {
    include /config/nginx/proxy.conf;
    include /config/nginx/resolver.conf;
    set $upstream_app nc.tech.lan;
    set $upstream_port 443;
    set $upstream_proto https;
    proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    proxy_hide_header Referrer-Policy;
    proxy_hide_header X-Content-Type-Options;
    proxy_hide_header X-Frame-Options;
    proxy_hide_header X-XSS-Protection;

    proxy_buffering off;
}

}

location ^~ /.well-known {
location = /.well-known/carddav { return 301 /nextcloud/remote.php/dav/; }
location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; }
return 301 /nextcloud/index.php$request_uri;
}
location ^~ /nextcloud/ {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app nc.tech.lan;
set $upstream_port 443;
set $upstream_proto https;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

rewrite /nextcloud(.*) $1 break;

proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_ssl_session_reuse off;

proxy_hide_header Referrer-Policy;
proxy_hide_header X-Content-Type-Options;
proxy_hide_header X-Frame-Options;
proxy_hide_header X-XSS-Protection;

proxy_buffering off;

}

Assumptions are the mother… it turned out that this was related to Cloudflare. It turned out that somehow the proxy service was activated (versus dns-only).