VPS侦探论坛

 找回密码
 注册
查看: 2938|回复: 3

添加网站时ssl报错

[复制链接]
发表于 2022-1-5 23:12:18 | 显示全部楼层 |阅读模式

使用阿里云申请的证书,下载的是.pem和.key
使用 openssl x509 -outform der -in ./ssl/wx-local.jurongcity.com.pem -out ./ssl/wx-local.jurongcity.com.crt转换了一下
然后安装报错如下
Enter 1, 2, 3 or 4: 1
Please enter full path to SSL Certificate file: /home/wwwroot/ssl/wx-local.jurongcity.com.crt
Please enter full path to SSL Certificate Key file: /home/wwwroot/ssl/wx-local.jurongcity.com.key

Press any key to start create virtul host...
Create Virtul Host directory......
set permissions of Virtual Host directory......
You select the exist rewrite rule:/usr/local/nginx/conf/rewrite/none.conf
Test Nginx configure file......
nginx: [emerg] cannot load certificate "/home/wwwroot/ssl/wx-local.jurongcity.com.key": PEM_read_bio_X509_AUX() failed (SSL: error:0909006CEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
Reload Nginx......
nginx: [emerg] cannot load certificate "/home/wwwroot/ssl/wx-local.jurongcity.com.key": PEM_read_bio_X509_AUX() failed (SSL: error:0909006CEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
Reload service php-fpm  done
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'nsh'@'localhost'
Add database failed!
Test Nginx configure file......
nginx: [emerg] cannot load certificate "/home/wwwroot/ssl/wx-local.jurongcity.com.crt": PEM_read_bio_X509_AUX() failed (SSL: error:0909006CEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
Reload Nginx......
nginx: [emerg] cannot load certificate "/home/wwwroot/ssl/wx-local.jurongcity.com.crt": PEM_read_bio_X509_AUX() failed (SSL: error:0909006CEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
================================================
Virtualhost infomation:
Your domain: wx-local.jurongcity.com
Home Directory: /home/wwwroot/nsh
Rewrite: none
Enable log: yes
Database username: nsh
Database userpassword: nsh
Database Name: nsh
Create ftp account: no
Enable SSL: yes
  =>Certificate file
================================================


美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2022-1-6 09:38:39 | 显示全部楼层


这是哪位大神告诉你需要转换而且用这个命令转换的可以直接拉黑了
目前大部分ssl正式平台的ssl证书,不管pem还是crt都是ssl证书,直接使用
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2022-1-6 11:06:06 | 显示全部楼层

licess 发表于 2022-1-6 09:38
这是哪位大神告诉你需要转换而且用这个命令转换的可以直接拉黑了
目前大部分ssl正式平台的ssl证书,不管pem ...

我开始用的pem也是这样报错,看你的教程以为需要转换。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2022-1-11 10:20:15 | 显示全部楼层



本帖最后由 gworg 于 2022-1-11 10:22 编辑

证书在别的地方安装试一下,或者Gworg核验一下证书是否有问题,不需要转换格式,crt,key这种是标准格式可以直接用。
实在不行重新申请商业证书30元:https://gworg.taobao.com/
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-7 23:24 , Processed in 0.026307 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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