Nextcloud version (eg, 20.0.5): 20.0.4
Operating system and version (eg, Ubuntu 20.04): Raspberry Pi OS 11
Apache or nginx version (eg, Apache 2.4.25): 2.4.54
PHP version (eg, 7.4): 8.0.22
The issue you are facing:
I am running Nextcloud on a docker swarm behind a nginx reverse proxy protected by Cloudflare. In theory, everything is working fine. One issue I’m facing is that when I want to access my server with the desktop app, I cannot use https://nextcloud.mydomain.com because of the following error:
The polling URL does not start with HTTPS despite the login URL started with HTTPS. Login will not be possible because this might be a security issue. Please contact your administrator
I fixed this my changing the the following:
From
'overwrite.cli.url' => 'localip:port',
to
'overwrite.cli.url' => 'https://nextcloud.mydomain.com',
'overwriteprotocol' => 'https',
By doing so, I cannot access my server via localip:port anymore. I get the following error:
ERR_TOO_MANY_REDIRECTS
When I try to access it in a private browser window (no cookies etc) I get to the login page, but then the loading thing in the “signing in”-button just turns, but nothing happens.
Under Admin > Logging it doesn’t show anything related, the last entry is from a few days ago, even though I just tried to access it and all options are ticked. The log in portainer shows the following:
10.0.0.2 - - [29/Aug/2022:16:05:02 +0000] "GET /login?redirect_url=/apps/files/ HTTP/1.1" 200 8424 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
10.0.0.2 - - [29/Aug/2022:16:05:07 +0000] "POST /login HTTP/1.1" 303 1504 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'instanceid' => 'ocmnyk01f68r',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
0 => '192.168.178.36:8086',
1 => 'nextcloud.mydomain.com',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '24.0.4.1',
'overwrite.cli.url' => 'https://nextcloud.mydomain.com',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => 'db',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'xxx',
'dbpassword' => 'xxx',
'installed' => true,
'loglevel' => 2,
'maintenance' => false,
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'tls',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'xxx',
'mail_domain' => 'mail.com',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'xxx',
'mail_smtpport' => '587',
'mail_smtpname' => 'xxx',
'mail_smtppassword' => 'xxx',
);
The output of your Apache/nginx/system log in /var/log/____
:
"apache2/access.log" is a device file