VPS侦探论坛

 找回密码
 注册
查看: 825|回复: 1

lnmp1.7的NGINX与SSL路径不一致

[复制链接]
发表于 2021-5-20 13:24:39 | 显示全部楼层 |阅读模式



通过lnmp ssl add 申请证书后,显示如下:
-----END CERTIFICATE-----
[Thu May 20 12:14:16 CST 2021] Your cert is in  /usr/local/acme.sh/xxxx/xxxx.cer
[Thu May 20 12:14:16 CST 2021] Your cert key is in  /usr/local/acme.sh/xxx/xxx.key
[Thu May 20 12:14:16 CST 2021] The intermediate CA cert is in  /usr/local/acme.sh/xxx/ca.cer
[Thu May 20 12:14:16 CST 2021] And the full chain certs is there:  /usr/local/acme.sh/xxx/fullchain.cer
[Thu May 20 12:14:16 CST 2021] Run reload cmd: /etc/init.d/nginx reload
Reload nginx... nginx: [warn] conflicting server name "xxxx" on 0.0.0.0:80, ignored
done
[Thu May 20 12:14:16 CST 2021] Reload success
Let's Encrypt SSL Certificate create successfully.
Create dhparam.pem...
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
................................................+.........+.........................................................................................................................................................++*++*++*++*
Test Nginx configure file......
nginx: [emerg] cannot load certificate "/usr/local/nginx/conf/ssl/xxx/fullchain.cer": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/nginx/conf/ssl/xxxx/fullchain.cer','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
Reload Nginx......
nginx: [emerg] cannot load certificate "/usr/local/nginx/conf/ssl/xxxx/fullchain.cer": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/nginx/conf/ssl/xxx/fullchain.cer','r') error:2006D080:BIO routines:BIO_new_file:no such file)


进行到这一步,ssl证书已经申请成功,并且按照lnmp开发者的逻辑应该已经被复制到/usr/local/nginx/conf/ssl目录下,但是,实际上这一步并没有完成,该目录下并没有ssl证书导致nginx启动失败。
美国VPS推荐: 遨游主机LinodeLOCVPSKVMLAVPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2021-5-21 08:31:09 | 显示全部楼层


生成证书就是直接生成到 /usr/local/nginx/conf/ssl 下的
提示的xxx的域名添加了多次
cat /usr/local/acme.sh/account.conf 看一下CERT_HOME是否自行更改了目录
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2021-6-15 20:39 , Processed in 0.048593 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表