AMQPS Symfony Messenger 和 Heroku
我通过 Heroku 的附加组件使用 CloudAMQP (https://elements.heroku.com/addons/cloudamqp )与“小狐猴”计划。 我正在构建一个 PHP Symfony 应用程序,我想通过 SSL 连接到 AMQP,但它在文档中说:
如果您想使用 TLS/SSL 加密的 AMQP,您还必须提供 CA 证书。在 amqp.cacert PHP.ini 设置(例如 amqp.cacert = /etc/ssl/certs)或 DSN 的 cacert 参数(例如 amqps://localhost?cacert=/etc/ssl/certs)中定义证书路径/)。 » (https://symfony.com/doc/current/messenger.html# amqp-传输)
我的问题是我不知道 cacert 文件在 Heroku 上的位置。
你能帮我解决这个问题吗?
I’m using CloudAMQP though Heroku’s add-on (https://elements.heroku.com/addons/cloudamqp) with the « Little Lemur » plan.
I’m building a PHP Symfony application and I want to connect to AMQP through SSL but it says in the documentation that :
If you want to use TLS/SSL encrypted AMQP, you must also provide a CA certificate. Define the certificate path in the amqp.cacert PHP.ini setting (e.g. amqp.cacert = /etc/ssl/certs) or in the cacert parameter of the DSN (e.g amqps://localhost?cacert=/etc/ssl/certs/). » (https://symfony.com/doc/current/messenger.html#amqp-transport)
My issue is that I have no idea where is located the cacert file on Heroku.
Can you help me with this please ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经找到了解决方案,对于那些想知道如何在 Heroku 上处理它的人:您需要下载 CloudAMQP 的根 CA (https://www.cloudamqp.com/docs/faq.html#how-do-i-authenticate-the-identity-of-your-server-tls-certificates)并将其放入您的源代码,例如在
public
文件夹中。然后,只需在 MESSENGER_DSN 环境变量中设置路径,如下所示
XXX?cacert=/app/public/cacertfilename.cer
I've found the solution, for those who wants to know how to deal with it on Heroku : you need to download the root CA of CloudAMQP (https://www.cloudamqp.com/docs/faq.html#how-do-i-authenticate-the-identity-of-your-server-tls-certificates) and put it in your source code, for example in the
public
folder.Then, just set the path in the MESSENGER_DSN env variable like this
XXX?cacert=/app/public/cacertfilename.cer