Nextcloud v24 update problem redirecting your domain

Nextcloud v24 update problem redirecting your domain

[Problem solved]

Message:
The main issue is a TOO_MANY_REDIRECTS failure when visiting the root nextcloud address https://[mydomainname]/. Server tries to redirect to the login page, but after several attempts it fails with the “Site isn’t redirecting properly” message.


****** FIX THE NEXTCLOUD REDIRECTION PROBLEM WITH (TRUENAS CORE freeBSD)



Watch the video before editing your file:

ssh user@192.168.30.30 # Connect in user mode to TrueNas Core with your IP

iocage console [Lenomdujails] # I enter the jails

cd /usr/local/etc/nginx/conf.d
Save and move the “nextcloud.conf” file by renaming it:
mv nextcloud.conf nextcloud.conf.bug.redirect
ee /usr/local/etc/nginx/conf.d/nextcloud.conf # Use “ee” editor to see line numbers
Editing file: “nextcloud.conf”
Note: /!\ Modify the file in order line by line (Comment out “#” or delete the lines) /!
line 5 # Redirect to HTTPS
line 22 # listen 443 ssl http2;
line 23 # server_name _;
Line 34 Delete > Brace > }
line 36 Delete > server {
line 37 Delete > Line 37 > EMPTY
line 44 # location / {
line 45 # return 301 https://$host:443$request_uri;
Line 46 # }
[Save file] Esc > a > a
service nginx restart
https://[yourdomainname]/
Thanks Sysadmin102 for this solution