Cannot login after fresh install

Support intro

Hello, I’m moving the first steps with nextcloud, but I’m stumbling already :slight_smile:
I installed nextcloud on my server with the Web Installer.
Almost everything went fine (just a weird url without domain at the end of the process), but the problem is that I cannot login.
I tried to change the password several times with occ, but no luck.

Nextcloud version (eg, 20.0.5): 23.0.3
Operating system and version (eg, Ubuntu 20.04): Centos8 Stream
Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.1
PHP version (eg, 7.4): 7.4.28

The issue you are facing:
I try to log in at https://[mydomain]/nextcloud/xyz/index.php/login but the page reloads every time.

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

Steps to replicate it:

  1. Launch setup-nextcloud.php
  2. Complete the setup
  3. Try to login

The output of your Nextcloud log in Admin > Logging:

nothing (cannot access there, and nextcloud.log shows no recent logs)

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

<?php
$CONFIG = array (
  'instanceid' => 'ocumjebmf0z5',
  'passwordsalt' => 'xyz',
  'secret' => 'xyz',
  'trusted_domains' => 
  array (
    0 => '[mydomain]',
  ),
  'datadirectory' => '/var/www/[mydomain]/nextcloud/xyz/data',
  'dbtype' => 'mysql',
  'version' => '23.0.3.2',
  'overwrite.cli.url' => 'https://[mydomain]/nextcloud/xyz',
  'dbname' => 'nextcloud_xyz',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xyz',
  'dbpassword' => 'xyz',
  'installed' => true,
);

The output of your Apache/nginx/system log in /var/log/____:
nginx error log does not show anything
nginx access log:

x.y.z.w - - [01/Apr/2022:21:33:07 +0200] "POST /nextcloud/xyz/index.php/login HTTP/1.1" 303 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
x.y.z.w - - [01/Apr/2022:21:33:07 +0200] "GET /nextcloud/xyz/index.php/core/apps/recommended HTTP/1.1" 303 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
x.y.z.w - - [01/Apr/2022:21:33:07 +0200] "GET /nextcloud/xyz/index.php/login?redirect_url=/nextcloud/xyz/index.php/core/apps/recommended HTTP/1.1" 200 5977 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"

If you query your main URL, you get redirected to:
https://web1.xyz.it

So it’s most likely the webserver configuration…

Sorry @tflidd xyz was just a fake domain I put there to obfuscate the actual one.
I’ll edit the post to avoid confusion.
Thanks for the reply anyway
-Lorenzo

Update: after a while I tried again with v.24 and I had the same issue.

Then I found an old post that mentioned the folder /var/lib/php/session, and I realized that the group of the folder was ‘apache’; but I’m actually running nginx on the server, so I chgrp’ed it, restarted php-fpm, and now I can login :slight_smile: