track web; update/fix nginx configs
authorShane <chown_tee@proton.me>
Sun, 11 Jan 2026 01:08:57 +0000 (01:08 +0000)
committerShane <chown_tee@proton.me>
Sun, 11 Jan 2026 01:08:57 +0000 (01:08 +0000)
etc/gitweb.conf
etc/nginx/conf.d/git-http.conf
scripts/deploy.sh
scripts/gitweb-simplefrontend/indextext.html [new file with mode: 0644]

index b14c28e4a89e1593db5e77c5a5362c170788d75a..dceacb65387799c2be623fd559e3158300d7fcb3 100644 (file)
@@ -1,6 +1,8 @@
 # path to git projects (<project>.git)
 $projectroot = "/srv/git"; # [CUSTOM: VPS git root]
 
+$base_url = "https://git.nutra.tk"; #[CUSTOM : Base URL for links, to force HTTPS]
+
 # directory to use for temp files
 $git_temp = "/tmp"; # [CUSTOM]
 
index 91120d755de4f7017d0b6a755896a1f64371cb38..2c6604a1b68e36556aaf95d159988cf4298350e6 100644 (file)
@@ -42,12 +42,16 @@ server {
         fastcgi_param QUERY_STRING $query_string;
         # Pass remote user for authentication (if we add auth later)
         fastcgi_param REMOTE_USER $remote_user;
+        
+        # Explicitly tell backend we are on HTTPS
+        fastcgi_param HTTPS on;
+        
         fastcgi_pass unix:/var/run/fcgiwrap.socket;
     }
 
     listen 443 ssl;
-    ssl_certificate /etc/letsencrypt/live/dev.nutra.tk/fullchain.pem; # managed by Certbot
-    ssl_certificate_key /etc/letsencrypt/live/dev.nutra.tk/privkey.pem; # managed by Certbot
+    ssl_certificate /etc/letsencrypt/live/earthyenergy.mooo.com/fullchain.pem; # managed by Certbot
+    ssl_certificate_key /etc/letsencrypt/live/earthyenergy.mooo.com/privkey.pem; # managed by Certbot
     include /etc/letsencrypt/options-ssl-nginx.conf;
     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
 }
index 761275cdcd77661101ebf34b3b320a98577e70ac..db95697cf915888f6877bae1b41963970ce47960 100755 (executable)
@@ -26,6 +26,12 @@ if [ "$1" = "diff" ]; then
         fi
         diff -u --color=always "$DEST_CONF_DIR/$BASENAME" "$FILE" || true
     done
+
+    # Diff gitweb.conf
+    if [ -f "$GITWEB_CONF_SRC" ]; then
+        diff -u --color=always /etc/gitweb.conf "$GITWEB_CONF_SRC" || true
+    fi
+    
     exit 0
 fi
 
@@ -98,6 +104,13 @@ if sudo nginx -t; then
         sudo cp "$GITWEB_CONF_SRC" /etc/gitweb.conf
     fi
 
+    # Deploy Gitweb frontend assets
+    if [ -d "$REPO_ROOT/scripts/gitweb-simplefrontend" ]; then
+        echo "Deploying Gitweb frontend..."
+        sudo cp -r "$REPO_ROOT/scripts/gitweb-simplefrontend/"* /srv/git/
+        sudo chown -R www-data:www-data /srv/git/
+    fi
+
     echo "✓ Deployment successful."
 else
     echo "✗ Configuration failed validation! Rolling back..."
diff --git a/scripts/gitweb-simplefrontend/indextext.html b/scripts/gitweb-simplefrontend/indextext.html
new file mode 100644 (file)
index 0000000..f510657
--- /dev/null
@@ -0,0 +1,4 @@
+<div style="text-align: center; margin: 2rem;">
+    <h1>Welcome to NutraTech Git</h1>
+    <p>Please browse our repositories below.</p>
+</div>