更换WEB服务器步骤

821 服务器 发表评论
1、创建用户 useradd -d /home/guozao -s /bin/bash guozao mkdir /home/guozao chown -R guozao: /home/guozao passwd guozao 2、加入sudoer vim /etc/sudoers 找到: root ALL=(ALL) ALL 在后面加入: guozao ALL=(ALL) NOPASSWD:ALL 3、修改hostname vim /etc/hostname vim /etc/hosts 4、添加ssh本地计算机的公钥 su guozao mkdir .…

更新alpine Nginx容器中的Let’s Encrypt证书(certbot方式)

2.8k 技术 , , 一条评论
本文说明如何在Docker的alpine nginx容器中更新https证书, 非Docker容器请参考:使用Let's Encrypt免费为网站加上HTTPS 步骤如下: 1、alpine中安装certbot # apk add --no-cache certbot 2、在alpine容器中执行更新命令: # 使用【默认配置目录】的更新命令 # certbot renew # 使用【自定义配置目录】的更新命令 # certbot renew --co…