We successfully installed Discourse through DigitalOcean using the following guide:
discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub
Our DNS is fully propagated, and we also installed our SSL CERTS per the following guide:
When browsing to our Discourse installation via IP or domain name, we get the following message:
This site can’t be reached
XX.XX.XX.XX refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
What could be the problem?
Almost certainly a SSL problem. Try rebuilding with plain HTTP first to make sure everything is working before adding on the complexity of HTTPS.
pfaffman
(Jay Pfaffman)
3
Using let’s encrypt is an easy way to get ssl.
kirupa
(Kirupa Chinnathambi)
5
I am running into this same issue, To rebuild with plain HTTP, does that require just commenting out the SSL template line in app.yml?
pfaffman
(Jay Pfaffman)
6
Yes, but browsers that have visited your site will refuse to connect. You really should use https.
「いいね!」 4
For anyone that face it in the future, make sure to not exceed the rate limit of LetsEncrypt:
You can see if it was exceeded in the logs:
./launcher logs app
「いいね!」 2
BoyanXu
(BoyanXu)
8
Chrome から全く同じプロンプトが表示されました。
私の場合は、いくつかの設定が誤って設定されていました。一部は Discourse の設定、一部はホスティングサーバーの設定でした。参考として、私のチェックリストをここに投稿します。
/var/discourse/containers/app.yml を確認する
(この投稿に従ってください:https://meta.discourse.org/t/advanced-setup-only-allowing-ssl-https-for-your-discourse-docker-setup/13847)
https/http の両方を許可する(ポート 443 を開き、SSL 関連のテンプレート設定と Let’s Encrypt 関連の設定のコメントアウトを解除する)か、http リクエストのみを許可する(ポート 443 を禁止し、SSL 関連のテンプレート設定と Let’s Encrypt 関連の設定をコメントアウトする)のどちらかになっていることを確認してください。
app.yml に変更を加えた場合は、./launcher rebuild app を実行して更新された設定を有効にしてください。
./launcher logs app を実行する
私のように、機能する Discourse サーバーの再構築に頻繁に失敗する場合は、同時に Let’s Encrypt の認証情報要求が多すぎて制限を超えている可能性があります。
その場合、./launcher logs app を実行すると、429 エラーが含まれた json. が表示されます。
- ECS サーバーインスタンスの「セキュリティグループ」設定を確認する
私の場合、「セキュリティグループ」は許可されたポート(例:80 HTTP、443 HTTPS)のバンドルであり、サーバーと外部空間との通信を制御できます。
Discourse のホスティングに必要なポートが許可されていることを確認してください。
- ファイアウォール設定を確認する
私の場合、ステップ 3 では必要なポートが開きませんでした。ファイアウォール設定に問題がありました。
奇妙なことに、サーバーのファイアウォールを設定したことはありませんでしたが、以下の設定後にそれらのポートが実際に開きました。
apt install firewall-cmd
firewall-cmd --permanent --add-port=20-21/tcp(…および他のポート)
firewall-cmd --reload
オンラインサービスを使用して、ドメインのオープンポートの状態を確認してください。
「いいね!」 2
Jack51
(Jack)
9
同じ問題が発生しました。証明書のレート制限を超えていました。
手順#1(app.yml の 2 つの SSL テンプレートをコメントアウトする)に従い、再構築後に別のブラウザでサイトを開くことで解決しました。
1 週間経過後に SSL を再度有効化できると思います。
「いいね!」 2