Discourse-appコンテナが起動してからサイレントに停止します

はい!上記に記載されているページの設定を愚かに適用してしまい、他のnginx設定ファイルと比較しても、なぜプロキシがディスコースの80:443でリッスンしないのか理解できませんでした… :confused:

以下は、表示されると予想していたものです。

server {
	listen 80;
	server_name discourse.mydomain.com;
    return 301 https://$host$request_uri;  # httpsへのルーティング
}

server {
	listen 443 ssl
	listen [::]:443 ssl;
	server_name discourse.mydomain.com;

	ssl_certificate      /etc/letsencrypt/live/discourse.mydomain.com/fullchain.pem;
	ssl_certificate_key  /etc/letsencrypt/live/discourse.mydomain.com/privkey.pem;

	root /var/www/html;

	# PHPを使用している場合は、index.phpをリストに追加してください
	index index.html index.htm index.nginx-debian.html;

	location / {
      proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:; # ソケットを使用
      proxy_set_header Host $http_host;
      proxy_http_version 1.1;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header X-Real-IP $remote_addr;
	}
}

NPM:@pfaffmanのアドバイスに従いUse Nginx Proxy Manager to manage multiple sites with Discourse を読みました。そのため、NPMのインストールオプションを評価しましたが、これはやりすぎのように思えます…

皆様、ご協力ありがとうございました!

参考として、npmnginx proxy manager は異なるものです。専門用語を混同しているため、手助けしようとしている人々を混乱させています。

「いいね!」 2

その場合、nginxを設定してDiscourseにプロキシする必要があります。

Discourse専用の新しいVMを起動することをお勧めします。

「いいね!」 1

申し訳ありません、Stephen。混乱させてしまいましたが、記事で言及されているツールの名前を使用しただけです。NPMとnginx(プロキシマネージャーとして)が異なるものであることは理解しています。そのため、大文字を使用しました。

まさにそれをやろうとしています。これについてサポートできないことは承知していますが、ヒントやリンクをいただけると幸いです!

できません、ジェイさん。友人がアプリをデプロイするのを手伝っているのですが、彼らのサーバー設定を変更することはできません。だから、nginxの問題を解決しなければならないのです…

ちなみに、私の理解では次のようになっています。

  • Discourseはポート80/443でリッスンしています。
  • nginxは、ドメイン名に基づいて異なるアプリケーションにリクエストをディスパッチするスイッチの役割を果たしています。
    • netxcloud.mydomain.com はポート80に到達しようとします → リクエストは server_IP:8000 にルーティングされます
    • crm.mydomain.com はポート80に到達しようとします → リクエストは server_IP:9000 にルーティングされます
    • discourse.mydomain.com はポート80に到達しようとします → http://unix:/var/discourse/shared/standalone/nginx.http.sock: にルーティングされます(末尾のコロンはタイプミスではないことを願っています)。セットアップスクリプトがDiscourseをこのソケットでリッスンするように設定したためです。

これで合っていますか?

ご協力ありがとうございます!

それはかなり迷惑で混乱を招きますが、@jlgarnier に公平を期すために言うと、その頭字語は、Discourse で複数のサイトを管理するために Nginx Proxy Manager を使用する で Nginx Proxy Manager を指すために @tophee または @pfaffman のいずれかによって最初に使用されました。私はそれを好みませんが、もしそれが「間違っている」としても、それは OP のせいではありません。

たとえば、トピックには Nginx Proxy Manager に完全に焦点を当てた Install NPM というセクションがあります。

それは私もだまされました。
元のものが8年後に既存の頭字語を乗っ取ったのは迷惑ですね。

「いいね!」 2

サイトを閲覧しましたが、彼らがその頭字語を自分で使用しているのを見たことがありません。

Docker セットアップでそれを使用しています。nginx-proxy-manager/docker/docker-compose.dev.yml at develop · NginxProxyManager/nginx-proxy-manager · GitHub

services:
  npm:
    image: nginxproxymanager:dev
    container_name: npm_core
「いいね!」 1

あ、しまった!気づきませんでした。:slightly_smiling_face:

皆さん、こんにちは。

本日午後にnginxのセットアップを再度試みます。ソケットの正確な構文 http://unix:/var/discourse/shared/standalone/nginx.http.sock: を確認していただけますか?末尾のコロンがタイプミスでないことを確認したいのです…

ご協力ありがとうございます!

そのコロンはそこにあるべきではないと思います。

Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf the modifications I proposed last Friday and Discourse now runs fine! At least I can reach the welcome page but I don’t receive the activation mail, which is not related to Discourse (I suspect my friend didn’t create the requested mail account :blush:).

I owe you a warm thank you for the help you provided and hope I won’t come back on this forum too soon! :wink:
Indeed… I’ve applied in discourse.conf

「いいね!」 2

予想よりも早く戻ってきましたが、皆さんの素晴らしい提案で私を追い出すことができるでしょう!:grin:

状況は以下の通りです。

  • Discourseは稼働しており、Docker(またはPortainer)はコンテナが正常であることを示しており、ウェルカムページ forums.mydomain.com にアクセスできます。
  • 技術的なメールアカウントは正しく作成されているにもかかわらず(ホスティングプロバイダー = OVH)、アクティベーションメールが届きません。
  • この技術アカウントからメールを送信することをテストしました(以下の設定で)= OK。
  • 現在のメール設定は以下の通りです。
DISCOURSE_SMTP_ADDRESS: ssl0.ovh.net
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_USER_NAME: forums@mydomain.com
DISCOURSE_SMTP_PASSWORD: "Str0ngPassw0rd"
DISCOURSE_SMTP_ENABLE_START_TLS: false
DISCOURSE_SMTP_DOMAIN: mydomain.com
DISCOURSE_NOTIFICATION_EMAIL: noreply-forums@mydomain.com

どこから調査を始めるべきかよくわからないので、どんなアドバイスでもいただけると嬉しいです!

よろしくお願いします!

最初に確認するのは、forums@mydomain.comnoreply-forums@mydomain.com の代理で送信するように設定されているかどうかです。これは、メールプロバイダーで確認する必要があります。

「いいね!」 1

「on behalf of」で送信できない可能性があるため、app.yml を更新して同じアドレスを設定しました。

DISCOURSE_SMTP_ADDRESS: ssl0.ovh.net
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_USER_NAME: forums@mydomain.com
DISCOURSE_SMTP_PASSWORD: "Str0ngPassw0rd"
DISCOURSE_SMTP_ENABLE_START_TLS: false
DISCOURSE_SMTP_DOMAIN: mydomain.com
DISCOURSE_NOTIFICATION_EMAIL: forums@mydomain.com

telnet ssl0.ovh.net 465 を試したところ = OK でした。

しかし、discourse-doctor は次のように報告しています。

========================================
Discourse 2.9.0.beta9
Discourse version at forums.mydomain.com: Discourse 2.9.0.beta9
Discourse version at localhost: NOT FOUND
==================== DNS PROBLEM ====================
This server reports NOT FOUND, but forums.mydomain.com reports Discourse 2.9.0.beta9 .
This suggests that you have a DNS problem or that an intermediate proxy is to blame.

[... ]

Testing sending to myprivatemail@yahoo.fr using ssl0.ovh.net:465, username:forums@mydomain.com with plain auth.
======================================== ERROR ========================================
                                    UNEXPECTED ERROR

Net::ReadTimeout

====================================== SOLUTION =======================================

メールの問題は、 alleged DNS 問題に関連している可能性がありますか?「中間プロキシ」はなく、nginx をプロキシ Web サーバーとして実行しているだけです…

これが問題の原因でしょう。別のポートを試していただけますか?もしお使いのメールプロバイダーが対応していれば、ポート587で最良の結果が得られることが多いです。

ポートを587に変更する場合は、これをコメントアウトするか、trueに設定する必要があります。

いいえ、私のメールプロバイダー(ホスティングプロバイダーと同じ)はポート465しか許可していません。ところで、ドメイン(これはサブドメインですか?)にSPFとDKIMレコードを設定する必要があると読みましたが、まだ何も設定していません。これには影響がありますか?

新しい Discourse のインストールでメールのトラブルシューティングを行うを参照してください

「いいね!」 1

投稿を閲覧していますが、いくつかの情報を忘れてしまいました。

  • DNSは(一部のサービスについては)ホスティングプロバイダーによって管理されており、ServerAにあるとします。
  • Discourseは別のサーバー(ServerB)で実行されており、これは別のプロバイダーによってホストされています。

私の理解では、ServerB上のDiscourseがServerA上のメールサーバーに接続し、メール/パスワードで認証して、ServerAのホスティングプロバイダーが提供するSMTPサービスを使用するということになります。

これは異常な構成でしょうか、それとも通常のapp.ymlのメール設定をここで使用できますか?