こんにちは皆さん、
codinghorror さんのアドバイスに従って設定を簡素化し、Let’s Encrypt がサブドメインをサポートするようになったため、Discourse を foo.bar/forum から forum.foo.bar に移行することにしました。
行った手順は以下の通りです:
app.yml のドメイン名を変更し、カスタムコマンドからフォルダのリマップを削除しました。その後、Discourse の remap 機能を使って foo.bar/forum を forum.foo.bar にマッピングし、投稿の再ビルドを行いました。
問題はこれです:
https://forum.foo.bar/ を開くと、https://stylesheets/etc を取得しようとするため、フォーラムの表示が崩れてしまい、ログインやテーマの変更ができません。
これを修正するにはどうすればよいでしょうか?
必要であれば、インストール URL は https://forum.legiochristi.com/ です。
私の app.yml は ## this is the all-in-one, standalone Discourse Docker container template### - Pastebin.com です。
ご協力いただけると幸いです。
Okay I managed to log into the admin panel but I can’t seem to change the default theme since it’s dependent on JavaScript to apply.
I also can’t download my latest backup. Is there a way to do this in command line? Either change the theme or download a backup?
Thanks.
Johani
(Joe)
2018 年 2 月 26 日午前 8:47
3
Have you tried safe-mode?
your.site/safe-mode
I’m getting this error when I try:
Chrome says it’s an invalid redirect.
Is there a way to do it through command line?
Johani
(Joe)
2018 年 2 月 26 日午前 10:41
5
If there is, I’m not aware of it.
Perhaps someone more knowledgeable can comment on that.
Hope so. I’ll probably nuke it and rebuild after I fetch my last backup.
neil
(Neil Lalonde)
2018 年 2 月 26 日午後 9:52
7
Ironclad14:
What I did:
Changed the domain name in my app.yml, removed the folder remap from custom commands, then remapped foo.bar/forum to forum.foo.bar via discourse remap, then I rebaked posts.
You did a rebuild too? ./launcher rebuild app
Sure did.
The problem seems to be mostly that it’s trying to fetch https://stylesheets/file.css - I have no idea why that happened or how to fix it.
I see the files present in the container but they’re just not called correctly.
neil
(Neil Lalonde)
2018 年 2 月 27 日午後 3:37
9
It’s actually using hostname stylesheets there? Or what is the actual url?
You haven’t given enough for us to help you. Can you post your container’s yml file after removing credentials?
Yes it’s actually using hostname stylesheets.
My app.yml is in the first post.
https://pastebin.com/pZPw3Ju5
neil
(Neil Lalonde)
2018 年 2 月 28 日午前 3:09
11
Your yml file still has the subfolder setting enabled:
DISCOURSE_RELATIVE_URL_ROOT: /
Delete that line from the file and rebuild again.
Okay great that worked! Now the only thing left is to fix all my missing images. I’m getting a 404 on all uploaded avatars and uploaded images. Very odd.
Update:
All images return 404. I rebaked posts, recovered uploads from tombstone, and double-checked whether or not the images exist in the directories.
https://forum.legiochristi.com/uploads/default/original/1X/b104612ae2622e9ccfbb55197bb4e46059a7c171.png
this is 404
yet it exists both in /var/www/discourse/public/uploads/default/original/1X and in /shared/uploads/default/original/1X (which is symlinked successfully, therefor)
I’m at a loss here.
Okay I just restored a week old backup and that didn’t help.
I also tried to chmod the uploads directory to 777
Does anyone have any ideas?
fabraz
(Fabricio Braz)
2020 年 5 月 12 日午後 2:44
15
@Ironclad14 さん、私も同じ問題に直面しています。解決方法が見つかったかどうか気になっています。もし見つかったなら、共有していただけませんか?
あらかじめありがとうございます!