Nextcloud Rewriting https to http

I have a scenario where I am using nextcloud over http protocol but using HAproxy through pfsense to encrypt the traffic over https with a letsencrypt cert. I use this method successfully with many other services on this network (plex, homeassistant, blue iris, etc). However with my new nextcloud installation it seems to inject the cert but then nextcloud will redirect/rewrite the login page back to http. If I manually add https to the url it connects with the certificate just fine but then after logging in (going to the app/dashboard page) it reverts to http again. My htaccess file is currently empty but when I do try to rewrite with htaccess I just get into a redirect loop. Snapshot of current process in a new incognito window getting to the login page:

Screenshot 2021-06-30 090411

Try adding this to your config.php;

'overwriteprotocol' => 'https',

1 Like

that did the trick, thank you!