Discourse is individually installed in a server which has ‘discourse.domain.com’ assined. The aim is to be able to use discourse ‘www.domain.com/discourse’. I followed the instructions on the github page; installed and re-configured nginx configuration.
[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/…’ ?
Update: the servers are behind cloudfire that is why I ended up using ip address in nginx config rather that domain name.
@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.
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!
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?
@tophee is correct this is a subfolder install and you should follow the subfolder guide.
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.
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
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.
I’ve just gone through a subfolder setup on a brand new installation. Emoji icons in the wizard look fine.
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.
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
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