前言
Linux 运维是后端基本功。
一、systemd 服务
[Service]
Type=simple
Restart=always
RestartSec=5二、nginx 反向代理
SSL 终结 + 静态直服 + 反向代理标准配置。
三、SSL 自动化
certbot + Let's Encrypt 自动续签。
四、HTTPS 跳转
80 端口 301 到 443。
五、日志轮转
logrotate + nginx reload。
总结
systemd + nginx + certbot 是黄金组合。