Main domain used as hostname instead of DISCOURSE_HOSTNAME for emoji path



I have an installation up and running but have a problem with emoji image path.

I have used this guide: discourse/ at master · discourse/discourse · GitHub and have used

./launcher rebuild app

after changing settings in app.yml

I may have initially configured


But layer changed to


Say I have a main domain:

and a subdomain:

which for some URI’s uses Apache’s ProxyPass, e.g. for

ProxyPass "/" "http://localhost:8090/"
ProxyPassReverse "/" "http://localhost:8090/"

and in app.yml I have the following settings:


then everything is loaded as expected (including other images) except emoijis, e.g.:


in which case it attempts to retrieve the image from the main domain:


with a 404 response.

It appears that the is used instead of as an absolute path in this particular situation, i.e. from the source code of the loaded page it refers respectively to a relative path

<meta name="twitter:image" content="/images/default-apple-touch-icon.png" />

and an absolute path

<p>Congratulations! <img src="//" title=":confetti_ball:" class="emoji" alt=":confetti_ball:"></p>

In the case of a relative path it works, but for the absolute path it doesn’t. And I don’t know how to change the absolute path :confused:


(Régis Hanol) #2

You will need to do a remap

# ssh into your server
cd /var/discourse
./launcher enter app
discourse remap "" ""