summaryrefslogtreecommitdiff
path: root/images/git/nginx
diff options
context:
space:
mode:
authorSystem administrator2017-05-29 13:26:10 +0200
committerSystem administrator2017-05-29 13:26:10 +0200
commitbc5c44dd049bad3b007be48b3f8d90886d63c105 (patch)
treea381d989db2295f228f9bc95a774f0cc9aef4c40 /images/git/nginx
downloadserver-bc5c44dd049bad3b007be48b3f8d90886d63c105.tar.gz
server-bc5c44dd049bad3b007be48b3f8d90886d63c105.tar.xz
server-bc5c44dd049bad3b007be48b3f8d90886d63c105.zip
Initial commit
Diffstat (limited to 'images/git/nginx')
-rw-r--r--images/git/nginx/nginx.conf51
1 files changed, 51 insertions, 0 deletions
diff --git a/images/git/nginx/nginx.conf b/images/git/nginx/nginx.conf
new file mode 100644
index 0000000..9528692
--- /dev/null
+++ b/images/git/nginx/nginx.conf
@@ -0,0 +1,51 @@
+worker_processes 1;
+user root;
+pid /run/nginx.pid;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+ sendfile on;
+ keepalive_timeout 65;
+ gzip on;
+
+ access_log /dev/stdout;
+ error_log /dev/stderr;
+
+ # Cgit
+ server {
+ listen 80;
+ root /usr/share/webapps/cgit;
+ server_name tx0.co;
+ try_files $uri @cgit;
+
+ location ~ /git(/.*) {
+ # Set chunks to unlimited, as the body's can be huge
+ client_max_body_size 0;
+
+ # Forward REMOTE_USER as we want to know when we are authenticated
+ fastcgi_param REMOTE_USER $remote_user;
+ fastcgi_pass unix:/run/fcgiwrap.sock;
+
+ include fastcgi_params;
+
+ fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
+ # fastcgi_param GIT_HTTP_EXPORT_ALL "";
+ fastcgi_param GIT_PROJECT_ROOT /data/git/repositories;
+ fastcgi_param PATH_INFO $1;
+ }
+
+ 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.sock;
+ }
+ }
+}