From 241f0f94b419b5798c6010e48deb2ce70e69f269 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 24 Jul 2020 23:30:53 +0200 Subject: config files --- setup/cgitrc | 19 +++++++++++++++++++ setup/nginx.conf | 37 +++++++++++++++++++++++++++++++++++++ setup/sudoers | 3 +++ 3 files changed, 59 insertions(+) create mode 100644 setup/cgitrc create mode 100644 setup/nginx.conf create mode 100644 setup/sudoers (limited to 'setup') diff --git a/setup/cgitrc b/setup/cgitrc new file mode 100644 index 0000000..945a5ff --- /dev/null +++ b/setup/cgitrc @@ -0,0 +1,19 @@ +css=/cgit.css +logo=/cgit.png + +readme=:Readme.md + +source-filter=/usr/lib/cgit/filters/syntax-highlighting.py +about-filter=/usr/lib/cgit/filters/about-formatting.sh + +enable-http-clone=1 +#clone-url= + +remove-suffix=1 + +scan-path=/var/git + +virtual-root=/ + +root-title=cGit +root-desc=cGit repos diff --git a/setup/nginx.conf b/setup/nginx.conf new file mode 100644 index 0000000..01c575d --- /dev/null +++ b/setup/nginx.conf @@ -0,0 +1,37 @@ +user www-data; +worker_processes auto; +pid /run/nginx.pid; +include /etc/nginx/modules-enabled/*.conf; + +events { + worker_connections 768; + # multi_accept on; +} + +http { + include mime.types; + default_type application/octet-stream; + sendfile on; + keepalive_timeout 65; + + # Cgit + server { + listen 80; + listen [::]:80; + + server_name git; + root /usr/share/cgit; + + try_files $uri @cgit; + + location @cgit { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; + fastcgi_param PATH_INFO $uri; + fastcgi_param QUERY_STRING $args; + fastcgi_param HTTP_HOST $server_name; + fastcgi_pass unix:/run/fcgiwrap.socket; + } + } +} + diff --git a/setup/sudoers b/setup/sudoers new file mode 100644 index 0000000..4848519 --- /dev/null +++ b/setup/sudoers @@ -0,0 +1,3 @@ +Runas_Alias GIT = git + +gitman ALL = (GIT) NOPASSWD: ALL -- cgit v1.2.3