diff options
Diffstat (limited to 'cgit')
| -rw-r--r-- | cgit/cgitrc | 26 | ||||
| -rw-r--r-- | cgit/entrypoint.sh | 4 | ||||
| -rw-r--r-- | cgit/nginx.conf | 26 |
3 files changed, 56 insertions, 0 deletions
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; + } + } |
