404 on /login in fresh install of Nexcloud 14.0.4.2

Hello,

I am trying to install Nextcloud with Nginx and mariadb on ArchLinux. After installation, I can visit cloud.mydomain which redirects me to cloud.mydomain/login which then returns 404.

The basic setup worked, it did also show the setup screen, but I used occ maintainence:install … for the installation and occ config to set some other options.

My nginx config for this virtual server looks like this:

user http;
worker_processes 1;
events {
    worker_connections 1024;
}

http {
    include mime.types;
    default_type application/octet-stream;

    sendfile on;
    keepalive_timeout 65;
    access_log off;
    error_log stderr crit;

    upstream php-handler {
        server unix:/run/php-fpm/php-fpm.sock;
    }

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name cloud.mydomain;

    # certs...

   root /usr/share/webapps/nextcloud/;

    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param HTTPS on;
        #Avoid sending the security headers twice
        fastcgi_param modHeadersAvailable true;
        fastcgi_param front_controller_active true;
        fastcgi_pass php-handler;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
}}}

This is my config.php (generated via occ)

<?php
$CONFIG = array (
  'passwordsalt' => 'JQfderaztP+Pv8L7ldSmJZ6izabl74',
  'secret' => 'G/PeXKOwTA805S2fi4I6zEOcmKC4H6kw0sxdWh/Q0GRoXhPa',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'cloud.mydomain',
  ),
  'datadirectory' => '/data/nextcloud',
  'dbtype' => 'mysql',
  'version' => '14.0.4.2',
  'overwrite.cli.url' => 'https://cloud.mycloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/run/mysqld/mysqld.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'eegae2dohw0Ait5eiyei',
  'installed' => true,
  'instanceid' => 'ocgsfcl1yhnr',
  'defaultapp' => 'calendar',
  'log_rotate_size' => 10485760,
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'mydomain',
  'mail_send_plaintext_only' => true,
  'logfile' => '/var/log/nextcloud.log',
  'log_type' => 'file',
);

When accessing https://cloud.mydomain , the nginx access log shows the redirect to /login and a subsequent 404 but leaves no trace in the nextcloud error log.

Shutting down php-fpm leads to 502 on / but still to 404 on /login, this probably means, that the forwarding is not correct. I took the line from the Arch Wiki. The Nexcloud docs are currently down. Does someone know where the error is?

It works with the documented nginx config https://docs.nextcloud.com/server/12/admin_manual/installation/nginx.html