这个域名之前在宝塔面板里已经申请了LET证书
然后现在要用lnmp使用这个域名的子域名,并且使用之前的let证书
那么问题来了,这里的证书文件完全路径和证书key文件完全路径,我该怎么得到?
宝塔那边倒是有密钥(KEY)和证书(PEM格式)的明文内容,可以这玩意要怎么添加到lnmp这里呢
是保存成文件吗?那么是什么后缀呢?放置的目录有什么讲究没有
上海网友:继续扒了扒,发现宝塔的/www/server/panel/ssl目录下有两个文件:
certificate.pem和privateKey.pem
然后把这两个文件丢到LNMP小鸡上,按文件的路径写进去,这样算是成了?
- 1: Use your own SSL Certificate and Key
- 2: Use Let’s Encrypt to create SSL Certificate and Key
- Enter 1 or 2: 1
- Please enter full path to SSL Certificate file: /usr/local/nginx/conf/ssl/certificate.pem
- Please enter full path to SSL Certificate Key file: /usr/local/nginx/conf/ssl/privateKey.pem
- 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: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
- nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
- Reload Nginx……
复制代码
吉林网友:元老也水贴子哦,直接把vhost的conf里面找到证书文件弄过去就行,或者直接新机器重新申请证书就可以
以上信息转载自Hostloc。