Http logo urls after enabling LetsEncrypt

I had a similar problem after moving to a two container configuration with nginx as the front end reverse proxy to a unix domain socket.

Everything works perfectly except that discourse was not changing http to https in the source and nginx does not rewrite / redirect this.

After a lot of digging around a days of trial and error, I finally found this command line setting:

cd /var/discourse
./launcher enter socket-only
rails c
SiteSetting.force_https = true

and verified:

postgres=# \c discourse
You are now connected to database "discourse" as user "postgres".
discourse=# select * from site_settings where name like '%http%';
 id |    name     | data_type | value |         created_at         |         updated_at         
----+-------------+-----------+-------+----------------------------+----------------------------
 79 | force_https |         5 | t     | 2020-04-16 05:51:13.165124 | 2020-04-16 05:51:13.165124
(1 row)

discourse=# \q

Then, I restarted:

./launcher restart socket-only

BOOM.

It worked, finally after days of head scratching and trial and error, wondering why every tutorial, howto and readme on the wild, wild net did not work flawlessly.

Now, setting force_https = true , it worked flawlessly :slight_smile:

This must be like a hidden jewel in a video game and only gamers who find the hidden power can move on to the next level !! LOL. I’m there! A new discourse superpower!