重置了自己的机子,从头搭一遍网站啦
如何安装Nginx: https://www.howtoing.com/how-to-install-nginx-on-ubuntu-18-04
配置ssl: https://www.howtoing.com/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04
安装add-apt-repository(找不到add-apt-repository命令)
add-apt-repository是一个Python脚本,允许你将APT存储库添加到/etc/apt/sources.list或/etc/apt/sources.list.d目录中的单独文件,该命令还可用于删除已存在的存储库。
如果你的系统上没有add-apt-repository,你将收到一条错误消息,指出“add-apt-repository command not found”。
add-apt-repository实用程序包含在software-properties-common软件包中,要安装它,请运行以下命令:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt update
sudo apt install python-certbot-nginx
sudo certbot --nginx -d example.com -d www.example.com

浙公网安备 33010602011771号