From 911a7dc7296f76a5de0538b3c3536167a89195d8 Mon Sep 17 00:00:00 2001 From: a73x Date: Sun, 25 Aug 2024 10:04:00 +0100 Subject: add ui --- cgit/cgitrc | 26 ++++++++++++++++++++++++++ cgit/entrypoint.sh | 4 ++++ cgit/nginx.conf | 26 ++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 cgit/cgitrc create mode 100644 cgit/entrypoint.sh create mode 100644 cgit/nginx.conf (limited to 'cgit') diff --git a/cgit/cgitrc b/cgit/cgitrc new file mode 100644 index 0000000..68daaa1 --- /dev/null +++ b/cgit/cgitrc @@ -0,0 +1,26 @@ +# +# cgit config +# + +css=/cgit.css +logo=/cgit.png + +# Following lines work with the above Apache config +#css=/cgit-css/cgit.css +#logo=/cgit-css/cgit.png + +# Following lines work with the above Lighttpd config +#css=/cgit/cgit.css +#logo=/cgit/cgit.png + +# Allow http transport git clone +#enable-http-clone=0 + + +# if you do not want that webcrawler (like google) index your site +robots=noindex, nofollow + +# if cgit messes up links, use a virtual-root. For example, cgit.example.org/ has this value: +virtual-root=/ + +scan-path=/home/git/ diff --git a/cgit/entrypoint.sh b/cgit/entrypoint.sh new file mode 100644 index 0000000..7981264 --- /dev/null +++ b/cgit/entrypoint.sh @@ -0,0 +1,4 @@ +spawn-fcgi -s /run/fcgiwrap/fcgiwrap.socket -f /usr/bin/fcgiwrap +chown nginx:nginx /run/fcgiwrap/fcgiwrap.socket + +exec nginx -g "daemon off;" diff --git a/cgit/nginx.conf b/cgit/nginx.conf new file mode 100644 index 0000000..592f2a0 --- /dev/null +++ b/cgit/nginx.conf @@ -0,0 +1,26 @@ + server { + listen 80; + # server_name git.example.com; + root /usr/share/webapps/cgit; + try_files $uri @cgit; + + # Configure HTTP transport + location ~ /.+/(info/refs|git-upload-pack) { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root/cgit.cgi; + fastcgi_param PATH_INFO $uri; + fastcgi_param GIT_HTTP_EXPORT_ALL 1; + fastcgi_param GIT_PROJECT_ROOT /home/git; + fastcgi_param HOME /home/git; + fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.socket; + } + + location @cgit { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root/cgit.cgi; + fastcgi_param PATH_INFO $uri; + fastcgi_param QUERY_STRING $args; + fastcgi_param HTTP_HOST $server_name; + fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.socket; + } + } -- cgit v1.2.3