diff --git a/7_https_fix.sh b/7_https_fix.sh new file mode 100644 index 0000000..4ce2a75 --- /dev/null +++ b/7_https_fix.sh @@ -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