Add 7_https_fix.sh

This commit is contained in:
2025-11-22 18:08:37 +05:30
parent c33220f6b7
commit 116a270cbd

29
7_https_fix.sh Normal file
View File

@@ -0,0 +1,29 @@
sudo tee /etc/nginx/sites-available/lan-proxy-https.conf >/dev/null <<'EOF'
server {
listen 443 ssl;
server_name github.generalinfinity.cloud;
ssl_certificate /etc/nginx/local.crt;
ssl_certificate_key /etc/nginx/local.key;
# Gitea backend (change port if your Gitea is different)
location / {
proxy_pass http://192.168.1.203:3100;
proxy_set_header Host $host;
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;
}
}
EOF
sudo ln -sf /etc/nginx/sites-available/lan-proxy-https.conf \
/etc/nginx/sites-enabled/lan-proxy-https.conf
sudo nginx -t
sudo systemctl reload nginx