Overview: When installing a new installation of www/nextcloud from the FreeBSD quarterly branch, this results in a redirect loop after the user selects "Finish Setup" at the web ui nextcloud setup screen. Steps to reproduce: 1) Install www/nextcloud from quarterly branch 2) Configure required tech stack 3) Enter nextcloud configuration details in web ui 4) Select "Finish Setup" Detailed steps to reproduce are available in a guide that I've written: https://www.samueldowling.com/2018/12/08/install-nextcloud-on-freenas-iocage-jail-with-hardened-security/ Bug is produced when user does not move from quarterly branch to latest branch of FreeBSD repository. Actual Results: User gets a redirect loop Expected Results: Successfully navigate to nextcloud web interface Build Date & Hardware: Bug first encountered in Nextcloud version 14.0.0 Build: 08/12/2018 Hardware: - FreeNAS 11.1 (FreeBSD 11.1 jail) - Supermicro X9 SRi-F Motherboard - Samsung EVO 860 SSD - Intel Xeon E5-2660V2
Hi Samuel, What is it redirecting to? (Developer view in browser or webserver logs should show) Cheers, Bernard.
(In reply to Bernard Spil from comment #1) Hi Bernard, Thanks for the quick reply. The error seems to be a continuous redirect - the error that I've had (In Firefox, at least, though similar in other browsers) is "The page isn’t redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete." I've made the mistake of tearing my test instance down, so I'll spin another one up to answer your question and get back to you later. I've realised after submitting the bug report that I'd left out some detail however, so I'll add it here. I originally experienced this issue when the quarterly branch was at 14.0.0, and the latest branch was at 14.0.1_1. It appears as though the patch to 14.0.1 was to fix the broken apps-pkg path in config.php. Since moving to the latest branch, I've had no issues whatsoever, but a number of people following my guide have reported the same issue I experienced when they stay on the quarterly branch. One of these users reported today that their config.php configuration in nextcloud 15.0.0 didn't contain the ammendments to fix the broken apps-pkg path, which I suspect is the root of the issue, though I'm not sure. If there's anything else you need let me know. Cheers, Sam
(In reply to Bernard Spil from comment #1) Bernard, The redirect is to /index.php/apps/files Cheers, Sam
This is so old now, can you confirm this still is the case?
Hi, I am seeing this redirect loop issue as well on a fresh 12.2-RELEASE install, both quarterly or latest package branches. Nextcloud install is successful but immediately after logging in as the admin user there is a redirect loop to /index.php/apps/files/ The happens with nextcloud 20.0.4_1, 20.0.7, and 21.0.0 packages with PHP 7.4 and PHP 7.3. If I install the nextcloud package to bring in all the dependencies, delete only the nextcloud package, and manually extract nextcloud-21.0.0.zip from upstream to the same /usr/local/www/nextcloud path with the same Apache and php-fpm configs everything works perfectly with no redirect loop. It's not clear why the redirect loop happens with the package but not when installed manually. Thanks in advance.
i can confirm this, i set this up via ansible and a shell script. 20.0.2 was no problem, tested 20.0.7 and 21.0.0 after this and it was not working. After Installing via command line my config.php is missing the apps-pkg section for freebsd. After editing this after Installation there is no redirect but an internal server error. It seems its generating a wrong config.php with wrong app settings.
Created attachment 222901 [details] diff config.php 20.0.3 and 20.0.4
Created attachment 222902 [details] revert pkg-plist patch from 20.0.4 The Error seems to be in the change of the pkg-plist in the 20.0.4 update. With the attached patch my setup with 20.0.4 and 21.0.0 is working like before and the config.php is right. BTW, updating nextcloud instances wasnt a problem, an update from 20.0.2 to 20.0.7 went without problems, thats maybe why nobody noticed it that fast. To be honest i thought for a while its an error in my webserver config or something before stumbling upon this thread. https://svnweb.freebsd.org/ports/head/www/nextcloud/pkg-plist?r1=557429&r2=558213&pathrev=558213
This is also an issue when I had to reinstall Nextcloud today.
(In reply to Neel Chauhan from comment #9) Hello, did the attached patch fix the problem for you?
Comment on attachment 222902 [details] revert pkg-plist patch from 20.0.4 This patch makes no sense. Why would an installation without a default config file make things work?
Comment on attachment 222901 [details] diff config.php 20.0.3 and 20.0.4 Please don't share secrets and salts... :'( Thie effectively removes existing adaptations that the port makes.