קבלת שגיאת Cloudflare 521 לאחר שדרוג Discourse ל-3.5.0.beta8-dev

Hi everyone,

After updating my Discourse site to 3.5.0.beta8-dev, I’m suddenly getting a 521 “Web server is down” error when accessing the site through Cloudflare. This is unexpected since I had previously configured it according to this guide, and it had been working perfectly until now.

Then I tried changing the SSL/TLS encryption mode in Cloudflare from Full (Strict) to Flexible, and the site loaded again.

Does anyone know why this might be happening after the update?
Is there something new in 3.5.0.beta8-dev that could affect Cloudflare compatibility or HTTPS handling?

Any help or suggestions would be greatly appreciated!

Thanks in advance!

אני מריץ 3.5.0.beta8-dev עם Full (strict) SSl עם Cloudflare ואין לי בעיות.

כמה דברים לבדוק:

  • בדוק את Let’s Encrypt שלך - עיין ביומן השדרוג שלך ואמת שכל מה שנבנה מחדש כראוי.
  • בדוק אם יש שינויים בחומת אש חיצונית (DigitalOcean מספק חומות אש חיצוניות)

ה-521 והמעבר ל-Flexible מצביעים על כך שהשרת שלך אינו מוגדר עם HTTPS.

Thanks for the suggestions! @LotusJeff

I’ve checked my SSL setup, and I’m not using Let’s Encrypt, I generated an Origin Certificate from Cloudflare, and placed the key and cert here:

I did a full rebuild after checking. But I’m still getting a 521 error when Cloudflare is set to Full (Strict).

Here’s the template section from my app.yml for reference:

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  ## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  # - "templates/web.letsencrypt.ssl.template.yml"
  - "templates/cloudflare.template.yml"

expose:
  - "80:80"   # http
  - "443:443" # https

Thanks again for taking the time to help!

Working from memory, Cloudflare certs have a 90 day duration. This will require you to create new certs every 3 months. Do you remember how old your certs are?

The default setting is to use Let’s Encrypt. The system will auto renew your certs for you. One less thing to manage manually.

Cloudflare now privide Certificates that valid for up to 15 years, mine is still within the valid period.

That said, just to be sure, I also tried generating a new certificate and replaced the existing one, but I still got the same problem.

If I want to switch back to the default setup using Let’s Encrypt,
is it enough to simply:

  1. Uncomment this line in app.yml:
- "templates/web.letsencrypt.ssl.template.yml"
  1. And set Cloudflare’s SSL mode to Full?

מעולם לא ביצעתי את המעבר מתעודות פרטיות ל-Let’s Encrypt עם Discourse, ועם זאת…

בתוך קובץ app.yml, תצטרך להסיר הערה בשני מקומות:

  1. שורת התבנית עבור - "templates/web.letsencrypt.ssl.template.yml"
  2. כתובת הדוא"ל של חשבון Let’s Encrypt:
## אם הוספת את התבנית של Let's Encrypt, הסר הערה למטה כדי לקבל תעודת SSL בחינם
  LETSENCRYPT_ACCOUNT_EMAIL: <הוסף כאן את כתובת הדוא"ל שלך>

אם ביצעת שינויים ידניים אחרים בתבניות עבור תעודות SSL מותאמות אישית, יהיה צורך להחזיר אותם להגדרות הסטנדרטיות.

רכיב Let’s Encrypt ממוקם לקראת הסוף בעת בנייה מחדש של האפליקציה. שים לב אליו וראה אם אתה מקבל קודי שגיאה כלשהם.

לייק 1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.