My initial situation
My initial problem was that I could not log in to a freshly installed Nextcloud instance. The login page came up without any issues, but after typing the credentials, the page reloaded automatically. I tried again and again to login without any progress.
I noticed that when I typed my own IP address, it showed up with HTTPS instead of HTTP. This happened even though I didn’t set anything in NGINX. I just had to add HTTP explicitly, and it worked.
The setup was on a VM and, as said, without SSL setup. I have a HAProxy in front, which I want to set up with SSL later on. If it’s imported, nginx, PostgreSQL and Redis were or are used for it.
TL;DR
This situation is solved now, I guess. The solution to it was to add an overwrite configuration of the protocol to stay on HTTP in the config.php
file.
Addition to the config.php
file:
'overwriteprotocol' => 'http',
My Question
Do I have some missed SSL configuration somewhere, or does Nextcloud have an automatic internal HTTPS redirection?