ssl证书错误error:0906D06C PEM_read_bio:no start line

nginx: configuration file /etc/nginx/nginx.conf test failed
在使用nginx配置ssl证书时
测试nginx配置输入 nginx -t出现如下错误

  1. nginx: [emerg] cannot load certificate key "/etc/nginx/cert/server.key": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
  2. nginx: configuration file /etc/nginx/nginx.conf test failed

是从godaddy上申请的证书

应该是秘钥文件编码不对,将.key文件保存成UTF8格式即可

參考:https://iot-me.club/archives/%E9%85%8D%E7%BD%AEnginx%E7%9A%84ssl%E8%AF%81%E4%B9%A6%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AFerror0906d06cpemreadbionostartline

ssl证书错误error:0906D06C PEM_read_bio:no start line
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Scroll to top
0
Would love your thoughts, please comment.x
()
x