# Setup wizard emoji wrong in subfolder install

**URL:** https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442
**Category:** Bug
**Tags:** subfolder
**Created:** [July 3, 2018, 6:40am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442 "2018-07-03T06:40:56Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![hayzem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hayzem/32/97875_2.png) [@hayzem](https://meta.discourse.org/u/hayzem)
#### Post date: [July 3, 2018, 6:40am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/1 "2018-07-03T06:40:57Z")

</div>

Discourse is individually installed in a server which has ‘[discourse.domain.com](http://discourse.domain.com)’ assined. The aim is to be able to use discourse ‘[www.domain.com/discourse](http://www.domain.com/discourse)’. I followed the instructions on the github page; installed and re-configured nginx configuration.

When I visit ‘[domain.com/discourse](http://domain.com/discourse)’ I get the errors saying ‘[domain.com/assets/{js-file}.js](http://domain.com/assets/%7Bjs-file%7D.js) is not loaded.’

Here is my configurations:

```
location ~ /discourse/(.*)$ {
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $host;
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_pass http://{ip of discourse server}:80/$1;
    }

```

container/app.yml is not reconfigured after installation.

When I hit [domain.com/discourse](http://domain.com/discourse) I get this log from nginx access logs:

```
[03/Jul/2018:06:35:34 +0000] "domain.com" xx.xx.xx.xxx "GET / HTTP/1.0" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0" "categories/index" 200 29332 "-" 0.044 0.043 "-"

```

There is nothing in nginx error logs.

Can you point out the mistake I am not able to see here? How can I configure the assets so they can be loaded correctly?  
Why the assets are not loaded as ‘[domain.com/discourse/assets/](http://domain.com/discourse/assets/)…’ ?

Update: the servers are behind cloudfire that is why I ended up using ip address in nginx config rather that domain name.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [July 3, 2018, 7:14am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/2 "2018-07-03T07:14:32Z")

</div>

I guess what you’re trying to do is a subfolder install? The instructions for that are here:

> [@Serve Discourse from a subfolder (path prefix) instead of a subdomain](https://meta.discourse.org/t/subfolder-support-with-docker/30507):
>
> warning Discourse Official Statement about Subfolder setup We support subfolder setups for our hosted customers at the enterprise level and up. Due to heavy technical setup complexity we strongly recommend you do not use this setup unless you are very experienced in custom subfolder setups. It is critical you have a deep understanding of NGINX setup in the Discourse Docker container Secure original IP forwarding using custom headers in the proxy chain Rate limiting in front proxy server I…

But note that it is absolutely not the recommended way of running discourse (search this forum for “subfolder install”.

---

<div class="post-metadata">

### Author: ![hayzem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hayzem/32/97875_2.png) [@hayzem](https://meta.discourse.org/u/hayzem)
#### Post date: [July 3, 2018, 11:00am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/3 "2018-07-03T11:00:02Z")

</div>

@tophee is it still considered ‘subfolder install’ when discourse is in different server and want to use it behind reverse proxy?  
I will give it a shot and update the topic.

---

<div class="post-metadata">

### Author: ![Cameron\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cameron_d/32/97535_2.png) [@Cameron\_D](https://meta.discourse.org/u/Cameron_D)
#### Post date: [July 3, 2018, 11:07am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/4 "2018-07-03T11:07:33Z")

</div>

Yes, because Discourse uses absolute URLs everywhere so you’ll need to set it up as a subfolder.

---

<div class="post-metadata">

### Author: ![UnivacTwo](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@UnivacTwo](https://meta.discourse.org/u/UnivacTwo)
#### Post date: [July 8, 2018, 10:25pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/5 "2018-07-08T22:25:03Z")

</div>

Dear Cameron,

There are some images which are not loading properly with discourse correctly installed in a subfolder on another server behind a reverse proxy. Please see the image bellow!

 ![missing%20pictures%20Discourse](https://global.discourse-cdn.com/meta/original/3X/a/7/a7210081f84c8f5cdebe8d9358dcb69a19829874.PNG)

the problem is that the missing pictures have the wrong image path. instead of having thery are for the logo I could manage to change as these images are configurable from admin, but what about this emoji images which are not loading correctly?

so instead of being [www.example.com/forum/img/img.png](http://www.example.com/forum/img/img.png) they are [www.example.com/img/img.png](http://www.example.com/img/img.png)

all the links, and everything else work as expected

Some other pictures are working, so I don’t suspect a miss configuration, but a bug.

Do you have any idea how I can resolve this?

Thank you  
F

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 9, 2018, 12:14am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/6 "2018-07-09T00:14:46Z")

</div>

> [@UnivacTwo](#):
>
> the problem is that the missing pictures have the wrong image path

@tophee is correct this is a subfolder install and you should follow the [subfolder guide](https://meta.discourse.org/t/subfolder-support-with-docker/30507).

Given the questions here I would recommend avoiding subfolder, it requires quite a lot of technical skills to get a proxy working just right. I would recommend just going with our vanilla setup.

---

<div class="post-metadata">

### Author: ![UnivacTwo](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@UnivacTwo](https://meta.discourse.org/u/UnivacTwo)
#### Post date: [July 9, 2018, 12:43am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/7 "2018-07-09T00:43:46Z")

</div>

Dear Sam, thank you for your fast answer.

I followed the guide and everything work correct but some pictures.

as you can see in the uploaded picture the Discourse logo has the corect path,  
url(‘/community/images/wizard/discourse.png’)

As I sadi, some picture shows correctly, some are not, how can an incorect setup can determine this type of behavior? In a situation in which none of the pictures show corectly I could say that something is wrong, but this is not the case

here are some pictures rendered corectly

 ![missing%20pictures%20Discourse%20-%201](https://global.discourse-cdn.com/meta/original/3X/a/b/ab24dc9d97a9e4dbd5ba88e9c5f2c55a5b048e2d.PNG)

 ![missing%20pictures%20Discourse%20-%204](https://global.discourse-cdn.com/meta/original/3X/d/0/d0dd78d42cae90ad8c1650946c3ace0d2dcf389b.PNG)

 ![missing%20pictures%20Discourse%20-2](https://global.discourse-cdn.com/meta/original/3X/c/b/cb7faa3801616c0ce1ecc87f5d4cd2f7e378a9b7.PNG)

and here are two from the same instaltion which are not correct rendered

this one is from a recover password page

 ![missing%20pictures%20Discourse%20-%203](https://global.discourse-cdn.com/meta/original/3X/b/9/b94b08294640901253412159299383b5e9ba9ddf.PNG)

this one is from the initial registration process in which you can see above that other images are perfectly fine

 ![missing%20pictures%20Discourse](https://global.discourse-cdn.com/meta/original/3X/a/7/a7210081f84c8f5cdebe8d9358dcb69a19829874.PNG)

and this is the html code for the above images which are not rendering

 ![missing%20pictures%20Discourse%20-%20source](https://global.discourse-cdn.com/meta/original/3X/6/0/6072eb833699eba45543123faad5719133b41f96.PNG)

So, @sam, please tell me what I am doing wrong. I can give you the website URL if you want to see for yourself.

Thank you,

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 9, 2018, 1:02am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/8 "2018-07-09T01:02:31Z")

</div>

> [@UnivacTwo](#):
>
> please tell me what I am doing wrong.

You know, there is a reason we do not even offer subfolder setups to business and standard tier, this is a value add to our enterprise tier.

I am not sure what you are doing wrong and it would take me a fair amount of time to debug it.

---

<div class="post-metadata">

### Author: ![UnivacTwo](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@UnivacTwo](https://meta.discourse.org/u/UnivacTwo)
#### Post date: [July 9, 2018, 1:28am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/9 "2018-07-09T01:28:27Z")

</div>

Dear Sam,

Well, now I understand your perspective and I agree with your point of view.

I am sorry you could not give me some hints

If you say that this is not a bug, then what I need to do is to try to debug myself what is wrong.

---

<div class="post-metadata">

### Author: ![Cameron\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cameron_d/32/97535_2.png) [@Cameron\_D](https://meta.discourse.org/u/Cameron_D)
#### Post date: [July 9, 2018, 1:43am UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/10 "2018-07-09T01:43:38Z")

</div>

If they work through the rest of the site it could just be that the setup hard-codes the image paths.

---

<div class="post-metadata">

### Author: ![UnivacTwo](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@UnivacTwo](https://meta.discourse.org/u/UnivacTwo)
#### Post date: [July 9, 2018, 1:23pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/11 "2018-07-09T13:23:06Z")

</div>

I know, but this is not something that you can configure anywhere in the setup process. That’s why I was suggesting that this is a bug

---

<div class="post-metadata">

### Author: ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)
#### Post date: [July 9, 2018, 3:02pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/12 "2018-07-09T15:02:12Z")

</div>

> [@UnivacTwo](#):
>
> this is not something that you can configure anywhere in the setup process

The [subfolder guide](https://meta.discourse.org/t/30507) tells you how to configure it.

---

<div class="post-metadata">

### Author: ![UnivacTwo](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@UnivacTwo](https://meta.discourse.org/u/UnivacTwo)
#### Post date: [July 9, 2018, 4:32pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/13 "2018-07-09T16:32:46Z")

</div>

Dear @schleifer,

I have already did that. What I was saying is that there is no way in which you can configure a different path for center images and a different path for other images.

If I wouldn’t had everything configured correctly, none of the links/uploads/some avatars would work.

That’s why I am saying that this looks like a bug, as some pictures have correct path and other have not.

If you look at my above post you could see more examples with working and not working pictures from the same setup.

I have a very good understanding how http protocols and reverse proxy works and I don’t think the issue is in my configuration but in the way Discourse render some of the pictures.

Unfortunately I have no experience with rails application to try to figure out in what part of the code it may be the problem. That’s why I asked for some help from the Discourse community. But unfortunately, there are other interests with a subfolder setup than the well-being of the users trying to do this setup.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 9, 2018, 6:53pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/14 "2018-07-09T18:53:17Z")

</div>

@neil can you take a quick look at those wizard code paths and see if they’d be affected by subfolder?

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [July 9, 2018, 7:01pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/15 "2018-07-09T19:01:30Z")

</div>

I’m upgrading a DO subfolder site now, so I’ll check the wizard once that’s done.

---

<div class="post-metadata">

### Author: ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)
#### Post date: [July 9, 2018, 7:23pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/16 "2018-07-09T19:23:07Z")

</div>

I’ve just gone through a subfolder setup on a brand new installation. Emoji icons in the wizard look fine.

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/9/69cafe93e420058f581b357d7ad7c7942506b934.png)

So, if you follow the directions in the linked topic, it works. If you’ve setup things differently, then you’ll have to give a lot more detail about _how_ you setup the reverse proxy. Otherwise everyone is just randomly guessing what the problem is.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [July 9, 2018, 7:33pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/17 "2018-07-09T19:33:40Z")

</div>

Hmm, works for me too but the image url’s are wrong. Looks like a bug:

 ![DevTools_-gtmdiscourse_neillalonde_com_forum_wizard_steps_emoji_and_Discourse_Setup_and___general-_Discourse_Discourse_Chat](https://global.discourse-cdn.com/meta/original/3X/7/9/7959d2a2f06fa6f3027da4624af240a11bbff559.png)

---

<div class="post-metadata">

### Author: ![UnivacTwo](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@UnivacTwo](https://meta.discourse.org/u/UnivacTwo)
#### Post date: [July 9, 2018, 7:52pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/18 "2018-07-09T19:52:41Z")

</div>

Hello @neil ,

the reason images are loading for you is that somehow they are available also in the /images

`http://gtmdiscourse.neillalonde.com/images/emoji/twitter/smile.png`  
as you can see the image is loading  
 ![](https://global.discourse-cdn.com/meta/original/3X/f/b/fbdadf3dce6c52e7313cebd9f4ab8771fd434772.png)

I suspect that somehow you have another installation or a folder with the same images in the root of the website. But this should not be normal, as you may have another webserver with different images in that location

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 9, 2018, 9:48pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/19 "2018-07-09T21:48:54Z")

</div>

> [@neil](#):
>
> Looks like a bug:

OK if it’s a bug let’s fix it! Certainly looks that way from your screenshot.

---

<div class="post-metadata">

### Author: ![UnivacTwo](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@UnivacTwo](https://meta.discourse.org/u/UnivacTwo)
#### Post date: [July 9, 2018, 10:20pm UTC](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442/20 "2018-07-09T22:20:40Z")

</div>

THANK YOU @codinghorror @neil @schleifer

That’s really appreciated.

Is there a way in which I can help you track down all the images, or you have a smarter way than doing it manually?

[Next page](https://meta.discourse.org/t/setup-wizard-emoji-wrong-in-subfolder-install/91442.md?page=2)
