After a lot of banging, I found out the solution. I had a hunch the issue was with my proxy since I could connect directly via the IP. I used curl
to identify the issue: curl -IL nextcloud.example.com
. The actual issue was how NC was interacting with my proxy.
What I saw was the proxy was redirecting the http traffic to https, and then NC redirected from https://domain.tld to http://domain.tld/login, back to http. Then the proxy redirected it back to https of that domain, which is when people succeeded. I guessed this bouncing back and forth from http to https is what was causing the issue.
What ended up fixing the issue was updating my NC config so it wouldn’t keep redirecting back to http. I did this by adding the following lines to my config.
'overwrite.cli.url' => 'https://nextcloud.example.com',
'overwriteprotocol' => 'https',
'trusted_proxies' => ['10.0.0.2'],
I added/updated all three lines at the same time so I’m not sure what actually solved the issue, but I think it was the overwriteprotocol
is what did it. In the trusted_proxies line, add the IP of the server that is acting as the proxy in front of Nextcloud.