Hello there! I've been at this for a little more than 10 hours straight now but I couldn't for the life of me setup Nextcloud with HTTPS via NginxProxyManager, so I figured I would try to ask for some help over here as a last resort. So here's where I'm at...
I'm able to access my nextcloud server from the internet by entering my domain name "example.org" when I configure the Proxy Host in NPM to use HTTP. See attached image below for the NPM configuration I used and nextcloud's config.php file.
Here are some of the things I tried to get it to work through HTTPS (please don't judge if you see some nonsense here, I don't know what I'm doing):
Open ports 80 and 443 on my router, and verify with http://canyouseeme.org that they are indeed both open.
As per this video, I kept the NPM scheme as http, and the port as 80, but I created an SSL certificate with Let's Encrypt from the SSL tab, tick "Force SSL", "HTTP/2 Support", and "HSTS Enabled". This results in a timeout.
Tried all combinations of NPM scheme http/https and port 80/443 because why not. Same result, timeout.
Created a cloudflare account, and used that as a nameserver for my domain instead, created a CNAME record for my domain, and enabled the proxy option. Then I went back to my "HTTP:80:noSSL" NPM configuration that I mentionned earlier. Now I can connect to my nextcloud server, and I do get "Connection is secured" lock icon on my Chrome browser. However, if I block port 443 in my router, I can still access my nextcloud server, and I still get the "Connection is secured" lock icon. If I close port 80 and keep 443 open, I can no longer access (timeout), so I very doubt that this "connection is secured".
Then I thought maybe I need to put my own key and certificate on the nextcloud server (under appdata/nextcloud/keys), didn't change anything, still timeout.
Also tried to download the SSL/TLS client certificates from my cloudflare dashboard, and added those key and certificate as a custom SSL certificate in NPM, and used that instead of the Let's Encrypt auto-generated certificates, same result, timeout.
I probably tried a bunch of other stuff as well, but I think this is a good starting point. Surely I'm missing something here but I have no idea what and I'm really out of things to try at this point.
It would be very immensly appreciated if someone could please point me in the right direction to get Nextcloud to work with HTTPS via NginxProxyManager
Thanks a lot!
config_http.php