如何解决Host-c VPS安装Swizzin后无法安装Let's Encrypt的问题
如何解决Host-c VPS安装Swizzin后无法安装Let's Encrypt的问题
之前安装不上就比较麻烦,没有证书每次登录都要输入密码,所以再试试。
出错代码
root@host-c:~# sudo box install letsencrypt
INFO Installing letsencrypt
DOCS Further reference: https://swizzin.ltd/applications/letsencrypt
INPUT Enter domain name to secure with LE
> xxx.xxx.de
INPUT Do you want to apply this certificate to your swizzin default conf?
(y/n) > y
INPUT Is your DNS managed by CloudFlare?
(y/n) > n
... Installing ACME script
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1032 0 1032 0 0 1537 0 --:--:-- --:--:-- --:--:-- 1538
Done
WARN Could not set default certificate authority to Let's Encrypt. Upgrading acme.sh to retry.
ERROR Could not upgrade acme.sh.
Please consult the above and/or check the log (less -R +G /root/logs/swizzin.log)
查看log
less -R +G /root/logs/swizzin.log)
查看日志发现acme.sh安装不成功,主要还需要缺少依赖,让我尝试安装cron, crontab, crontabs,所以acme.sh脚本也没有成功安装到预期的位置。
[Sat Jul 13 08:31:49 UTC 2024] It is recommended to install crontab first. try to install 'cron, crontab, crontabs or vixie-cron'.
[Sat Jul 13 08:31:49 UTC 2024] Pre-check failed, can not install.
/usr/local/bin/swizzin/install/letsencrypt.sh: line 136: /root/.acme.sh/acme.sh: No such file or directory
解决步骤:
- 更新系统并安装依赖
sudo apt update
sudo apt install curl cron socat -y
- 手动安装acme.sh:
curl https://get.acme.sh | sh -s [email protected]
替换 [email protected] 为您的实际邮箱地址。
- 检查acme.sh安装成功:
~/.acme.sh/acme.sh --version
- 能查到版本,重新安装Let’s Encrypt:
sudo box install letsencrypt
- 查看后台截图安装成功
显示安装成功,后面就很方便的输入域名访问了。
阅读剩余
版权声明:
作者:Jensfrank
链接:https://moreopen.cc/2255.html
来源:MOREOPEN
文章版权归作者所有,未经允许请勿转载。
作者:Jensfrank
链接:https://moreopen.cc/2255.html
来源:MOREOPEN
文章版权归作者所有,未经允许请勿转载。
THE END