From: Shane Date: Sun, 11 Jan 2026 01:08:57 +0000 (+0000) Subject: track web; update/fix nginx configs X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=170a570fb45a754866362665172c4821bad860d8;p=nutratech%2Fvps-root.git track web; update/fix nginx configs --- diff --git a/etc/gitweb.conf b/etc/gitweb.conf index b14c28e..dceacb6 100644 --- a/etc/gitweb.conf +++ b/etc/gitweb.conf @@ -1,6 +1,8 @@ # path to git projects (.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] diff --git a/etc/nginx/conf.d/git-http.conf b/etc/nginx/conf.d/git-http.conf index 91120d7..2c6604a 100644 --- a/etc/nginx/conf.d/git-http.conf +++ b/etc/nginx/conf.d/git-http.conf @@ -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; } diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 761275c..db95697 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -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 index 0000000..f510657 --- /dev/null +++ b/scripts/gitweb-simplefrontend/indextext.html @@ -0,0 +1,4 @@ +
+

Welcome to NutraTech Git

+

Please browse our repositories below.

+