Using Google Chrome or Microsoft Edge to login to Nextcloud results in a spinning disc. A screen refresh is required to get past the login screen. This issue does not arise with Mozilla Firefox. A more serious issue is that a refresh is not possible with the Nextcloud mobile app (tested on Android only) so login is not possible.
The Cause
The reason is described in this issue Redirecting bug since 15.0.2. I believe it has something to do with being behind a reverse proxy.
Suggested (untested) code
Having a look at your code, I believe these lines (untested)...
if [ $NO_CERT -eq 1 ]; then
iocage exec "${JAIL_NAME}" su -m www -c "php /usr/local/www/nextcloud/occ config:system:set overwrite.cli.url --value=\"http://${HOST_NAME}/\""
else
iocage exec "${JAIL_NAME}" su -m www -c "php /usr/local/www/nextcloud/occ config:system:set overwrite.cli.url --value=\"https://${HOST_NAME}/\""
fi
Initially, I thought the overwriteprotocol value should be "http", because I had set up Nextcloud with NO_CERT=1 in the script config, but this didn't work for me when I used that value in config.php. It had to be "https". Now that could be because I separated out the Caddy function so I could put OnlyOffice behind Caddy as well. I'm not sure.
Hello danb35,
Symptoms:
Using Google Chrome or Microsoft Edge to login to Nextcloud results in a spinning disc. A screen refresh is required to get past the login screen. This issue does not arise with Mozilla Firefox. A more serious issue is that a refresh is not possible with the Nextcloud mobile app (tested on Android only) so login is not possible.
The Cause
The reason is described in this issue Redirecting bug since 15.0.2. I believe it has something to do with being behind a reverse proxy.
Suggested (untested) code
Having a look at your code, I believe these lines (untested)...
...could be placed before this section...
Initially, I thought the overwriteprotocol value should be "http", because I had set up Nextcloud with NO_CERT=1 in the script config, but this didn't work for me when I used that value in config.php. It had to be "https". Now that could be because I separated out the Caddy function so I could put OnlyOffice behind Caddy as well. I'm not sure.