diff options
-rw-r--r-- | setup/cgitrc | 19 | ||||
-rw-r--r-- | setup/nginx.conf | 37 | ||||
-rw-r--r-- | setup/sudoers | 3 |
3 files changed, 59 insertions, 0 deletions
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 |