Login no longer works

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 23.0.0.10
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.4 LTS
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 7.4.28

The issue you are facing:
Hey,
I uploaded the Nextcloud to my own server. So far everything has worked correctly.

But a few days ago, the login suddenly stopped working. I always get from https://my-domain.de/index.php/login
to
https://my-domain.de/index.php/login?redirect_url=/index.php/apps/dashboard/
forwarded. But I don’t see any errors either, such as “wrong password”.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

2022-02-23 16:24:04	Access	87.143.---.---	200	GET /index.php/login?redirect_url=/index.php/apps/dashboard/ HTTP/1.0		Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36	7.41 K	SSL/TLS-Zugriff für Apache
2022-02-23 16:24:08	Access	87.143.---.---	303	POST /index.php/login HTTP/1.0		Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36	1.24 K	SSL/TLS-Zugriff für Apache
2022-02-23 16:24:08	Access	87.143.---.---	303	GET /index.php/apps/dashboard/ HTTP/1.0		Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36	1.24 K	SSL/TLS-Zugriff für Apache
2022-02-23 16:24:08	Access	87.143.---.---	200	GET /index.php/login?redirect_url=/index.php/apps/dashboard/ HTTP/1.0		Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36	7.41 K	SSL/TLS-Zugriff für Apache

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => 'eMg2exXQ9IuZ7cCBPtyhT2UovzOGdR',
  'secret' => 'mTWW/Q717WfDzJZP9HYE3Yi2JgGfRZpUKlw8iJek7BUtMuP8',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'my-domain.de',
  ),
  'datadirectory' => '/var/www/vhosts/my-domain.de/.nextcloud/data/folder',
  'dbtype' => 'mysql',
  'version' => '23.0.0.10',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud_eed8d0ca',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'db-name',
  'dbpassword' => 'db-password',
  'installed' => true,
  'instanceid' => 'oc4h3guofvzb',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'noreply',
  'mail_domain' => 'my-domain.de',
  'mail_smtphost' => 'my-domain.de',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'mail',
  'mail_smtppassword' => 'passwort',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

this setting makes Nextcloud to generate all URL and redirects starting with http://localhost, which makes the client to talk with itself (as localhost is always the machine where you run the request) which is obviously not the best idea. From you description I assume you want this setting:

'overwrite.cli.url' => 'https://my-domain',

Thanks for the answer, but unfortunately it didn’t help. Unfortunately, the “forwarding” still happens.

I think the best troubleshooting step is to fire up developer tools (F12) of your browser and take a look which requests are successful and which fail and maybe why…

Do you mean the console?

I was thinking about “network” tab, here you can see requests your browser does pretty good - especially look for “domain” column. my login looks like this after 2FA:

image

from your initial post

|2022-02-23 16:24:08|Access|87.143.---.---|303|GET /index.php/apps/dashboard/ HTTP/1.0||Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36|1.24 K|SSL/TLS-Zugriff für Apache|
|---|---|---|---|---|---|---|---|---|
|2022-02-23 16:24:08|Access|87.143.---.---|200|GET /index.php/login?redirect_url=/index.php/apps/dashboard/ HTTP/1.0||Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36|7.41 K|SSL/TLS-Zugriff für Apache|

the line /index.php/login?redirect_url=/index.php/apps/dashboard/… shows you access /index.php/apps/dashboard/ as unauthenticated user and the system redirects you to the login dialog. check your domain column, maybe you recognize what’s wrong…

My view is slightly different. Hope it works anyway.
image

I’m sorry, did you read and understand my post?

Yes, of course I read it, but only understood it to a limited extent.

I can’t do the troubleshooting for you. especially from a screenshot posted without further details… Try to collect all the logs you find in the system one by one - you will find the issue sooner or later.

as you fix an overwrite.cli.url error maybe it helps to empty the browser cache (or navigate to your cloud from the incognito tab)