Nextcloud 17.0.1 - cannot login via browser, redirected back to login page

Nextcloud version: 17.0.1
Operating system and version: Arch Linux current
Apache or nginx version: Nginx 1.17.4
PHP version: 7.3.12

The issue you are facing:

I’m unable to login to Nextcloud via a browser (Firefox 70.0.1, Chromium 78.0.3904.108). When I hit login, I see the “Logging in” spinner appear briefly and the login page is reloaded.

I’m definitely sure this is some kind of PEBKAC/misconfiguration, but the Nextcloud log is empty (as is the Nginx log) and I’m kind of stuck.

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


Steps to replicate it


The output of your Nextcloud log in Admin > Logging


The output of your config.php file:

/etc/nginx/nginx.conf (excerpt):

The output of your Apache/nginx/system log:

  • Nextcloud log at /tmp/nextcloud.log is empty
  • Nginx log (journalctl -f -u nginx) is empty (no relevant lines)
  • php-fpm log (journalctl -f -u php-fpm) is empty (no relevant lines)

This can happen if you have installed and activated a plugin like BTPW (break the paywall).

Do you have similar issues logging into other web sites?

Do you have similar issues logging into other web sites?

No. As I said, I have tried logging in with two browsers. One of these (Chromium) was using a completely clean profile.

I have same issue

Not that this is the solution but every time i have had an issue like this I clear the browser cache close the browser and re open and the problem goes away.

Well, I have solved this problem. It was my fault, and specifically a Nginx misconfiguration:

		location / {
			return 301 $scheme://$host/index.php$request_uri;

should have read

		location / {
			rewrite ^ /index.php$request_uri;

Turns out rewrite and return 301 are not equivalent.

1 Like