From 914c976c44f1e68ac7ad793964628f851e28776c Mon Sep 17 00:00:00 2001
From: climbTheStairs ` tags
---
cgit.html | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
(limited to 'cgit.html')
diff --git a/cgit.html b/cgit.html
index 75e7ba7..b750a48 100644
--- a/cgit.html
+++ b/cgit.html
@@ -42,8 +42,7 @@
You should have an NGINX server running with a TLS certificate by now. Add the following configuration
to your server to pass the requests to Cgit, while serving static files directly:
-server {
+ server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/ssl/nginx/git.example.org.crt;
@@ -60,8 +59,7 @@ server {
fastcgi_param QUERY_STRING $query_string;
fastcgi_pass unix:/run/fcgiwrap.socket;
}
-}
-
+}
Then get NGINX to reload your configuration.
@@ -70,8 +68,7 @@ server { To change this, we need to configure Cgit to our liking, by editing/etc/cgitrc.
-
-css=/cgit.css
+ css=/cgit.css
logo=/cgit.svg
virtual-root=/
@@ -80,8 +77,7 @@ root-title=Chad's git server
root-desc=A web interface to LandChad's git repositories, powered by Cgit
# The location where git repos are stored on the server
-scan-path=/srv/git/
-
+scan-path=/srv/git/
This configuration assumes you followed the git hosting guide and store your repositories
on the /srv/git/ directory.
-usermod -c "Your Name" git
-
+ usermod -c "Your Name" git
hooks/post-receive and add
the following contents:
-
-#!/bin/sh
+ #!/bin/sh
agefile="$(git rev-parse --git-dir)"/info/web/last-modified
@@ -119,8 +112,7 @@ mkdir -p "$(dirname "$agefile")" &&
git for-each-ref \
--sort=-authordate --count=1 \
--format='%(authordate:iso8601)' \
- >"$agefile"
-
+ >"$agefile"
And give it execution permissions with:
-- cgit v1.2.3