Add 7_https_fix.sh
This commit is contained in:
29
7_https_fix.sh
Normal file
29
7_https_fix.sh
Normal 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
|
||||||
Reference in New Issue
Block a user