Мы перенесли объекты (например, изображения и другие) в AWS S3. Это сработало отлично.
Теперь мы хотим немного ускорить работу сайта. Как мне настроить AWS CloudFront в качестве DISCOURSE_CDN?
Я попытался настроить это самостоятельно. Всё работает, когда я использую forum-cdn. Но как только я ввожу URL в discourse_cdn, сайт становится неработоспособным, все изображения получают множественные перенаправления и перестают отображаться.
Lilly
(Lillian )
24.Ноябрь.2024 23:08:09
2
Вы посмотрели документацию здесь:
So you’d like to use a CDN to speed up worldwide access to common assets on your Discourse forum? You might want to go all-in and Set up file and image uploads to S3 (see also Configure an S3 compatible object storage provider for uploads ).
If you want a CDN without the added complexity of S3 and having two CDNs, this is the guide for you. The CDN will reduce some load on your server by letting the CDN serve those assets so that the server doesn’t have to. It also can speed things up by deliver…
а также
Hello All. I recently got my Discourse installation setup using AWS CloudFront (CF) for full site acceleration - and SSL offloading using AWS certs in CF. Note that this installation deviates from the official guide regarding CDN and SSL configuration - so that might be controversial and lead to future supportability issues. So be forewarned… there be dragons here. I am sharing the configuration that worked for me here:
Setup discourse to listen on port 80 only and disable Let’s Encrypt by co…
Да! Я использовал этот метод для настройки.
So you’d like to use a CDN to speed up worldwide access to common assets on your Discourse forum? You might want to go all-in and Set up file and image uploads to S3 (see also Configure an S3 compatible object storage provider for uploads ).
If you want a CDN without the added complexity of S3 and having two CDNs, this is the guide for you. The CDN will reduce some load on your server by letting the CDN serve those assets so that the server doesn’t have to. It also can speed things up by deliver…
Но во втором сообщении есть информация, в которой я не уверен, является ли она официальной инструкцией по настройке. Кроме того, пост был опубликован в 2021 году.
Не настраивайте «DISCOURSE_CDN_URL»
Lilly
(Lillian )
24.Ноябрь.2024 23:17:32
4
Всё необходимое должно быть здесь, начиная с этой темы
This topic covers how to configure some common S3 compatible Object Storage providers (S3 clones). See Set up file and image uploads to S3 for more details about Amazon AWS S3 configuration, which is officially supported and used internally by Discourse for our hosting services.
Provider
Service Name
Works with Discourse?
Amazon AWS
S3
Yes
Digital Ocean
Spaces
Yes
Linode
Object Storage
Yes
Google Cloud
Storage
Yes
Scaleway
Object Storage
Yes
Vultr
Obj…
Я уже сделал это. Изображение нашего сайта размещено на AWS S3 с CloudFront. Я пытаюсь кэшировать больше, например изображение user_avatar, вместо обращения к серверу.
CDN S3 должен быть указан как DISCOURSE_S3_CDN.
DISCOURSE_CDN предназначен для CDN приложения.
Я понимаю эту часть. Я пытаюсь добавить полный CDN для приложения на сайт. Поэтому я хотел бы использовать DISCOURSE_CDN.