acces Nextcloud with https

LDM

Cadet
Joined
Feb 24, 2024
Messages
7
Hello everyone,
Recently I have install nextcloud on my truenas scale and everything work well with the protocol http but when I add a certificate with truenas this activate the https for Nextcloud and my problem is here. Now when I go from outside with my domain If I try to go on the protocol http I have "The plain HTTP request was sent to HTTPS port" but when I add https befor my url I'm redirect to my local network and not to Nextcloud Online ( I enter "my_domain" and I'm redirect to "192.168.1.*" but when I'm not connect to the same wifi It doesn't work.
hoping for your help
Warmly
P.S : I'm French so sorry if my English isn't perfect at all
 

LDM

Cadet
Joined
Feb 24, 2024
Messages
7
hi, a little up to say that.

When I enter my domain with a slash anything that work well for example mydomain.com/settings/admin I'm redirect to the authentification page and I can connect with an refresh, but when I click on the icone of Nextcloud i'm redirect to the local I.P so I guess it's a problem of redirection in the config file if anyone have a cloud or idea, I'm taker. meanwhile I will make other reshearch

Warmly
 

LDM

Cadet
Joined
Feb 24, 2024
Messages
7
Hi, I'm returning to explain the solution I found after many attempts.

So, when you're in your configuration file, you need to navigate to 'reverse-proxy.config.php'. As a novice with containers, I used 'vi' because I'm not familiar with other commands for editing files. In the file, you replace "$overwriteHost = getenv('OVERWRITEHOST');" with "$overwriteHost = 'mydomain.com';". Next, go to your config.php and edit the 'overwritehost' to have " 'overwritehost' => 'mydomain.com', ". That's all! It's very easy once you know how to do it. I hope this helps others who encounter the same problem as I did.

Best regards.
 

MichaelN

Cadet
Joined
Feb 27, 2024
Messages
7
You must be using the Truecharts version. For those using the TrueNas chart, you would input this in the NextCloud Environment section during config.
1.png
 
Top