Files
Deployments/NginxAndLetsencrypt/增加新域名证书(2025-3-7).md

26 lines
845 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 为新的域名增加证书
## 相关设备和路径
1. 用xshell登录120.78.123.183
2. `cd /srv #下面有两个子目录NginxDocker和ycweb。和证书有关的在前者`
## 申请新证书
1. NginxDocker下有原有的init-letsencrypt.sh的申请原证书(yichao.art的脚本。
2. `cp init-letsencrypt.sh init-letsencrypt-yoin.sh`
3. 修改新文件把里面的yichao.art替换成新域名(yoin.fun)。
4. 执行文件。sh init-letsencrypt-yoin.sh
## 创建新的nginx配置文件
1. 在之前目录,执行 `cd server/nginx/conf/conf.d/`
2. `cp ycweb.conf yoinweb.conf`
3. 编辑新文件把里面的原有yichao.art全部替换成新域名yoin.fun)。保存退出
4. `docker ps` 列出当前的docker容器。
5. `docker restart [ID]` 重启nginx的容器
## 测试环境
* CentOS Linux release 7.3.1611 (Core)