Image upload and 404 error after changing domain


I have similar issue with my Discourse site after changing domain and the name of subfolder. My Discourse was and I changed it to

It was working fine before the change. Now I can’t download category logos and Debugger gives:

Error while fetching an original source: request failed with status 404 Source URL:

I think I have changed all the settings from old to the new domain.

I also tried discourse remap, but didn’t seem to change anything.

Do you have any suggestions, what I could try next?

Have you rebaked the posts?

Yes, here is what I did:

./launcher enter app
discourse remap
rake posts:rebake

After this, I didn’t see any change, then I did:

discourse remap

Then I noticed, in the category logo source path there is “/forum/talk/uploads”. This should be “/forum/uploads”. I tried to fix it with:
discourse remap '/forum/talk/uploads' '/forum/uploads'
rake posts:rebake

In addition, when I edit category and click save, the page returns to and this doesn’t exist. It should return back to

I checked my app.yml and noticed following lines:

 filename: /etc/nginx/conf.d/discourse.conf
 from: proxy_pass http://discourse;
 to: |
    rewrite ^/(.*)$ /forum/$1 break;
    proxy_pass http://discourse;

Should I change proxy_pass http://discourse; to proxy_pass;?

I’m sorry for dumb questions, doing this for the first time.:sweat_smile:

So you not only changed the domain name, but also to a subfolder?

It was already in subfolder before changing domain name, I just changed the name of subfolder at the same time with changing domain. I had problem with uploaded figures also before the domain name change, but category logos worked normally. Now I cannot even upload new category logo, it says something like “upload failed, try again”.