Activation emails contain example.com even after hostname change


(Joe Doss) #1

I am doing a non docker install, so I understand help is limited.

I didn’t set my domain name correctly when I started everything up and after updating env DISCOURSE_HOSTNAME='newhostname' in config/discourse.config
I was able to rebuild any internal links away from www.example.com with the following:

RAILS_ENV=production bundle exec script/discourse remap www.example.com newhostname
RAILS_ENV=production bundle exec rake posts:rebake

this converted all links in posts to the correct address but new activation emails still contain www.example.com along with embeded images are calling www.example.com. Is there another rake command that I can run to update the domain for emails?


(James Milligan) #2

You’re editing the wrong file - you need to edit the hostname line in config/discourse.conf


(Joe Doss) #3

Thanks a ton! That was it. I made the changes in that file and then I kept getting 500 errors with little info in the logs. Since it was a fresh install dropping the DB and just starting from a clean, I was able to resolve all of my linking issues. I will have to do some reading on what config file is used for what down the road.