Hey guys,
I have a self-hosted discourse server that I am hosting on an ec2 and I have it setup through a socket that proxies through nginx to set the domain name.
The issue I am having is that I can’t get the server to switch from http
to https
on emails.
Specifically for the activation email:
A new account was created for you at %{site_name}
Click the following link to choose a password for your new account:
%{base_url}/u/password-reset/%{email_token}
The base_url
always gives the http
version of the site, and not the https
version, which causes an error when someone tries to use the activation email.
I thought that the setting for base_url
would be in the site_settings
table, so I looked and there is a row that looks like this:
id name data_type value created_at updated_at
18 vapid_base_url 1 http://***.***.com 2022-05-28 05:33:29.471814 2022-06-18 08:31:48.220973
but changing the value
to https://...
doesn’t fix the email problem.
I don’t know where the value is for base_url
.
I also thought that maybe it was the DISCOURSE_HOSTNAME
property in the containers/app.yml
file, but I don’t think that is what it is. I tried changing that from a domain without the protocol, to one with it, but after a ./launcher rebuild app
, the whole discourse server goes down.
So I am asking, how do I get the site to use a https
url in emails and not http
. ?