You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
提供个解决方案:
借助项目acme.sh,建议使用docker运行acme.sh
ssh进shell,给acme.sh分配目录:
创建文件
docker-compose.yml
提供个我用的示例,使用的阿里云DNS和letsencrypt:
PS: 如果你内网拉取镜像有问题,请查看:https://1panel.cn/docs/user_manual/containers/setting 配置镜像加速,然后在1panel面板操作对应的按钮拉取
创建好后,运行容器:
容器跑起来后,接下来就是申请证书
ssh进服务器运行如下命令:
我使用的是letsencrypt,所以需要切换下,具体看acme.sh他们的官方文档
申请证书
PS: letsencrypt证书,是支持申请支持通配符的,比如
*.domain.com
这种配置网站的SSL,进1panel面板操作:
证书
=>上传证书
=>导入方式=选择服务器文件
这里的路径,你需要进目录
/opt/1panel/apps/acme.sh/out
查看,私钥文件后缀带Key是:
domain.com.key
证书文件就是:
fullchain.cer
创建好后,进网站的HTTPS配置,
Acme 账户
那选手动创建,然后选择你创建的证书即可。Beta Was this translation helpful? Give feedback.
All reactions