DNS error for autogenerated links and uploaded images


Hi all, I searched for posts to see if someone has had a similar problem before and I don’t see anything. I’m new to Discourse so any help is greatly appreciated!

I followed the docker installation for Digital Oceans to a T. My install is live at http://shitpost.kitchen/, and I have posting, inviting, and posting by email working smoothly. However, the install is at “http://forum.shitpost.kitchen/” and when I try to navigate to that URL it fails. All the autogenerated links (for invites, password changes, etc.) have the “forum.” suffix, so none of them work. I’ve been working around this by having users delete the “forum.” suffix from autogenerated links and that seems to work fine.

All uploaded images on my site are also broken, though. For example, I examined the empty picture container of one of my uploads and the URL is http://forum.shitpost.kitchen/uploads/default/original/1X/846e640df44e38ef4d6319be96c13eebd16c46d2.jpg and if I delete the forum suffix the picture appears.

I tried poking around /var/log to see if I can find a clue but no luck. Help!

Avatar server issues?
(Matt Palmer) #2

Sounds like DISCOURSE_HOSTNAME in your app.yml is set to forum.shitpost.kitchen. Fix that and rebuild, and things should be a lot better.


Thank you!! Is there an easy way to recursively repair the image URLs in my posts? And do I have to rebuild the app?

(Matt Palmer) #4

A remap should do the trick.


It looks like remap is a string replace. However, the HTML tag for my image URLs are relative-- the one above is

<img src="/uploads/default/...

so a string replace for “forum.” in all my post bodies won’t affect them.

(Matt Palmer) #6

If they’re host-relative, then they won’t be pointing to the other domain.


Weird. They are still pointing to forum. Do I need to rebuild? EDIT: I’ve rebuilt and images are still broken :confounded:

Edit2: These lines are commented out. Should they be?

## Uncomment if you want the container to be started with the same
## hostname (-h option) as specified above (default "$hostname-$config")

I just went ahead and re-uploaded the pictures.