繁体   English   中英

在 Laravel 中无法连接到 RDS PostgresQL SSL

[英]Trouble Connecting to RDS PostgresQL SSL in Laravel

我正在尝试在 Docker 中设置我的 Laravel 应用程序以使用 SSL 连接到托管在 AWS RDS 上的 Postgresql 数据库。 在我的配置中,我有证书的地址:

'sslmode' => env('DB_SSLMODE', 'verify-full'),
'sslrootcert' => env('DB_SSLROOTCERT', '/usr/local/share/ca-certificates/rds-combined-ca-bundle.pem')

我在 my.env 文件中没有任何内容可以覆盖它。 我可以使用 psql 连接到服务器:

psql -h {address} -p 5432 "dbname={dbname} user={user} sslrootcert=/usr/local/share/ca-certificates/rds-combined-ca-bundle-root.pem sslmode=verify-full"

所以我相信我的密钥设置正确。 我从 Laravel 得到这个错误:

SQLSTATE[08006] [7] root certificate file "/usr/local/share/ca-certificates/rds-combined-ca-bundle.pem" does not exist Either provide the file or change sslmode to disable server certificate verification

而且您最好相信该文件存在。 有人对我可以尝试的事情有任何想法吗?

谢谢!

斯科特

事实证明,我已将 AWS 设置为同时接受 2015 年和 2019 年的密钥,而我只需要它来接受 2019 年的密钥。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM