Nginx 反向代理 → LobeHub 内部端口 | Let's Encrypt 免费 SSL
浏览器 (https://suyushi.top:443)
→ Nginx (80/443)
→ LobeHub (127.0.0.1:3210)
yum install -y nginx
systemctl enable nginx
文件:/etc/nginx/conf.d/lobehub.conf
server {
listen 80;
server_name suyushi.top www.suyushi.top;
location / {
proxy_pass http://127.0.0.1:3210;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
yum install -y certbot python3-certbot-nginx
certbot --nginx -d suyushi.top -d www.suyushi.top \
--non-interactive --agree-tos \
--email panghusys2025@gmail.com \
--redirect
如果 nginx 起不来报 Address already in use:80:
fuser -k 80/tcp
systemctl start nginx