
更喜歡“根”選項卡中的一個,它通常有效時間更長( 10 年)。
來源:
https://github.com/symfony/amqp-messenger/blob/5.4/Transport/Connection.php#L232
https://github.com/symfony/amqp-messenger/blob/4175a0a98507e7ec575dca9b36e6c0a5a072d3fd/Transport/Connection.php#L285
uj5u.com熱心網友回復:
@Musa 感謝您的回答!我將為像我這樣從未設定此證書的人提供更多詳細資訊:
- 如果您需要使用 Amazon MQ,您應該以
pem格式下載 mq.eu-central-1.amazonaws.com 的根證書(請參閱@Musa 的回答,了解如何操作)。 - 然后您應該更改檔案
MESSENGER_TRANSPORT_DSN以.env添加新引數cacert(有關更多詳細資訊,請參閱 Symfony 檔案https://symfony.com/doc/current/messenger.html#amqp-transport):
MESSENGER_TRANSPORT_DSN=amqps://username:[email protected]:5671///_messages?cacert=/path-to-root-cert/mq-eu-central-1-amazonaws-com.pem
另一種可能的解決方案是指定 Amazon Root CA 1。每個 Linux 發行版都有此證書(請參閱包ca-certificates)。在這種情況下,MESSENGER_TRANSPORT_DSN必須是這樣的:
MESSENGER_TRANSPORT_DSN=amqps://username:[email protected]:5671///_messages?cacert=/etc/ssl/certs/Amazon_Root_CA_1.pem
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/460450.html
