From 116a270cbd4264a40cf844fdb43ebd40ba8b568d Mon Sep 17 00:00:00 2001 From: dhruv Date: Sat, 22 Nov 2025 18:08:37 +0530 Subject: [PATCH] Add 7_https_fix.sh --- 7_https_fix.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 7_https_fix.sh 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