Hi there,
I’m using Nextcloud since some years on my raspberry and it was working pretty well.
But since yesterday I cannot login with the WebInterface (Windows Client is still working).
With Chrome I enter my Name/Password, and it loads shortly the page and then the fields are empty again. With Firefox I get a “Redirection Error”:
Error: Redirection error
The requested website redirects the request in such a way that it can never be completed.
This problem can sometimes occur when cookies are disabled or refused.
I don’t know if that happens due a Nextcloud update or maybe a PHP Update to v8.0 some weeks ago.
Maybe someone can help me to find out and fix it.
Thanks in advance for the help
Dominik
Some information:
Nextcloud version (eg, 20.0.5): 24.0.1
Operating system and version (eg, Ubuntu 20.04): Raspbian GNU/Linux 10 (buster)
Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.2
PHP version (eg, 7.4): php 8.0.18
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Open WebInterface
- Enter Name/Password
The output of your Nextcloud log in Admin > Logging:
{"reqId":"nYOuwj8VwgmFBd2xj61c","level":0,"time":"2022-05-31T14:48:34+00:00","remoteAddr":"192.168.99.21","user":"--","app":"scss_cacher","method":"GET","url":"/nextcloud/apps/theming/styles?v=0","message":"SCSSCacher::process ordinary check follows","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1"}
{"reqId":"nYOuwj8VwgmFBd2xj61c","level":0,"time":"2022-05-31T14:48:34+00:00","remoteAddr":"192.168.99.21","user":"--","app":"scss_cacher","method":"GET","url":"/nextcloud/apps/theming/styles?v=0","message":"SCSSCacher::isCached d71e-98f1-theming.css isCachedCache is expired or unset","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1"}
{"reqId":"nYOuwj8VwgmFBd2xj61c","level":0,"time":"2022-05-31T14:48:34+00:00","remoteAddr":"192.168.99.21","user":"--","app":"scss_cacher","method":"GET","url":"/nextcloud/apps/theming/styles?v=0","message":"SCSSCacher::isCached d71e-98f1-theming.css dependencies successfully cached for 5 minutes","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1"}
{"reqId":"mCcQhdKoPKVYyc38KqMD","level":0,"time":"2022-05-31T14:48:39+00:00","remoteAddr":"192.168.99.21","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/apps/files/","message":"Current user is not logged in","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1","exception":{"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\NotLoggedInException","Message":"Current user is not logged in","Code":401,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":97,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":125,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php","Line":153,"CustomMessage":"Current user is not logged in"}}
{"reqId":"bFOm9oGDTR7OzlobUpEF","level":0,"time":"2022-05-31T14:48:43+00:00","remoteAddr":"192.168.99.21","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/apps/files/","message":"Current user is not logged in","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1","exception":{"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\NotLoggedInException","Message":"Current user is not logged in","Code":401,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":97,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":125,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php","Line":153,"CustomMessage":"Current user is not logged in"}}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
'instanceid' => 'ocwwfaesp7ym',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
0 => '192.168.99.3',
1 => 'raspberry',
),
'datadirectory' => '/var/www/html/nextcloud/data',
'overwrite.cli.url' => 'http://raspberry',
'default_phone_region' => 'DE',
'dbtype' => 'mysql',
'version' => '24.0.1.1',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'oc_admin',
'dbpassword' => 'xxx',
'installed' => true,
'maintenance' => false,
'memcache.local' => '\\OC\\Memcache\\Redis',
'filelocking.enabled' => 'true',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => '6379',
'timeout' => 0,
'password' => 'xxx',
'dbindex' => 0,
),
'theme' => '',
'logfile' => 'nextcloud.log',
'loglevel' => 0,
'enable_email' => false,
The output of your Apache/nginx/system log in /var/log/____
:
192.168.99.21 - - [31/May/2022:16:48:34 +0200] "GET /nextcloud/login?redirect_url=/nextcloud/apps/files/ HTTP/1.1" 200 4937 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:35 +0200] "GET /nextcloud/apps/theming/styles?v=0 HTTP/1.1" 200 554 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:35 +0200] "GET /nextcloud/js/core/merged-template-prepend.js?v=c4fb070d-0 HTTP/1.1" 200 3054 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:35 +0200] "GET /nextcloud/svg/core/logo/logo?color=ffffff&v=1 HTTP/1.1" 200 418 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:35 +0200] "GET /nextcloud/apps/accessibility/css/user-a82fd95db10ff25dfad39f07372ebe37 HTTP/1.1" 200 1252 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:35 +0200] "GET /nextcloud/apps/theming/favicon?v=0 HTTP/1.1" 200 7112 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:38 +0200] "POST /nextcloud/login HTTP/1.1" 303 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:39 +0200] "GET /nextcloud/apps/files/ HTTP/1.1" 303 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:39 +0200] "GET /nextcloud/login?redirect_url=/nextcloud/apps/files/ HTTP/1.1" 200 4941 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:43 +0200] "POST /nextcloud/login HTTP/1.1" 303 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:43 +0200] "GET /nextcloud/apps/files/ HTTP/1.1" 303 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:43 +0200] "GET /nextcloud/login?redirect_url=/nextcloud/apps/files/ HTTP/1.1" 200 4939 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"
192.168.99.21 - - [31/May/2022:16:48:49 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:49 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:49 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:49 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:49 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:50 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:50 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:50 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:50 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:50 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:50 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:50 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:50 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:51 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:51 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:51 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:51 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:51 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:51 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:51 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
192.168.99.21 - - [31/May/2022:16:48:51 +0200] "GET /nextcloud/login HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
19
Content of nginx-config
server {
listen 80;
server_name raspberry;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
add_header X-Frame-Options SAMEORIGIN;
add_header Referrer-Policy no-referrer always;
root /var/www/html/;
index index.php;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location = /.well-known/carddav {
return 301 $scheme://$host/nextcloud/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/nextcloud/remote.php/dav;
}
location = /.well-known/webfinger {
return 301 $scheme://$host/nextcloud/remote.php/dav;
}
location = /.well-known/nodeinfo {
return 301 $scheme://$host/nextcloud/remote.php/dav;
}
location ~ ^\/(?:ocm-provider|ocs-provider).* {
rewrite ^ /nextcloud$request_uri;
}
location ~ \.php$ {
#If a file isn't found, 404
try_files $uri =404;
#Include Nginx's fastcgi configuration
include /etc/nginx/fastcgi.conf;
#Look for the FastCGI Process Manager at this location
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
}
location ^~ /nextcloud {
# set max upload size
client_max_body_size 512M;
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;
location /nextcloud {
rewrite ^ /nextcloud/index.php;
}
location ~ ^/nextcloud/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/nextcloud/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ ^/nextcloud/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|ocm-provider/.+)\.php(?:$|/) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS off;
#Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
location ~ ^\/nextcloud\/(?:updater|ocs-provider|ocm-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
# Adding the cache control header for js and css files
# Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff|svg|gif)$ {
try_files $uri /nextcloud/index.php$request_uri;
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended
# to have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read
# into this topic first.
# add_header Strict-Transport-Security "max-age=15768000;
# includeSubDomains; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
# Optional: Don't log access to assets
access_log off;
}
location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
try_files $uri /nextcloud/index.php$request_uri;
# Optional: Don't log access to other assets
access_log off;
}
}
}