This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
The community reviewed whether to reopen this question 2 years ago and left it closed:
Original close reason(s) were not resolved
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
删除密钥密码:
如果证书和密钥在一起:
来源: http: //www.madboa.com/geek/openssl/#key-removepass
Remove the key pass phrase:
If the certificate and the key are together:
Source: http://www.madboa.com/geek/openssl/#key-removepass
我明白了...与 nginx 使用的私钥文件必须没有有密码。我删除了密码并且它起作用了。
I got it... the private key file used with nginx must not have a passphrase. I removed the passphrase and it worked.
因为您使用密码生成 .crt 文件,所以您需要在 Nginx conf 中为 .key 和 .crt 文件指定相同的密码,如下所示
请参阅 Nginx Doc
或者,如果您不需要证书文件的密码,只需使用
ssh-keygen
工具生成文件如下:Because you generate the .crt file with a passphrase, so you need to specify the same passphrase for your .key and .crt file in Nginx conf like this
See Nginx Doc
Or if you don't need the passphrase for your cert file, just use
ssh-keygen
tool to generate the file as following:这个问题现在有点老了,nginx 实际上至少从 1.2 版本开始就支持启动时询问密码。但这个问题仍然是相关的,因为在最新版本(带有 nginx 1.6 的版本 8)中,此功能已从 debian 中删除。原因是 nginx 的 systemd 脚本中尚未实现密码短语输入,而 apache 则已实现。手动启动 nginx 很简单,而且这也不是什么问题,因为无论如何都需要手动干预,这里没有使用 systemd。
参考: https://forum.nginx.org/read.php ?2,262900,262931#msg-262931
The question is a bit old now, and nginx actually supports passphrase asking at startup since at least version 1.2. But the issue is still relevant because this capability has been removed from debian in the latest release, version 8 with nginx 1.6. The reason is that passphrase input hasn't been implemented in the systemd script for nginx, while it has been for apache. Launching nginx manually simply works, and it's not too a problem since manual intervention is required anyway, there's no use of systemd here.
Reference: https://forum.nginx.org/read.php?2,262900,262931#msg-262931