gpt4 book ai didi

ssl - Phoenix 找不到 SSL key ,即使它存在于该位置

转载 作者:太空宇宙 更新时间:2023-11-03 13:37:30 25 4
gpt4 key购买 nike

尝试在生产模式下运行我的应用时(成功编译后):

MIX_ENV=prod mix phoenix.server

我收到以下错误:

** (EXIT) an exception was raised: ** (ArgumentError) could not start Cowboy adapter, the file /etc/letsencrypt/live/nhby.in/privkey.pem required by SSL's :keyfile does not exist

但是该 key 确实存在于该位置:

$ sudo ls /etc/letsencrypt/live/nhby.in/
cert.pem chain.pem fullchain.pem privkey.pem

关键位置根据文档在配置中定义:

keyfile: Path.expand("../../../../etc/letsencrypt/live/nhby.in/privkey.pem", __DIR__)

这里出了什么问题?

最佳答案

它很长而且不漂亮,但它有效:sudo HELLO_WORLD_SSL_KEY_PATH="/etc/letsencrypt/live/example.com/privkey.pem"HELLO_WORLD_SSL_CERT_PATH="/etc/letsencrypt/live/example.com/cert.pem"HELLO_WORLD_SSL_CA_PATH="/etc/letsencrypt/live/example.com/chain.pem"PORT=4000 SECRET_KEY_BASE=tLWwWJ1KMQmtkjZjJ56oTPeP5o5Or23I0UMCskyvKxVvcylsayrCJ3N0soaB3KuQ MIX_ENV=prod mix phx.server

关于ssl - Phoenix 找不到 SSL key ,即使它存在于该位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35086228/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com