diff options
author | tg(x) <*@tg-x.net> | 2016-11-06 11:38:56 +0100 |
---|---|---|
committer | tg(x) <*@tg-x.net> | 2016-11-06 11:38:56 +0100 |
commit | 5c68236e3af487bfa0b2a72edc194462fa6372fd (patch) | |
tree | 743618fd03af2c11a3ada89b1d87e2809812aeeb /etc/nginx/sites-enabled/git-ssl.site | |
parent | 07e336854803a140f39b8372c004830e65c55820 (diff) | |
download | deployment-5c68236e3af487bfa0b2a72edc194462fa6372fd.tar.gz deployment-5c68236e3af487bfa0b2a72edc194462fa6372fd.tar.bz2 deployment-5c68236e3af487bfa0b2a72edc194462fa6372fd.zip |
nginx: git-http-backend, cgit
Diffstat (limited to 'etc/nginx/sites-enabled/git-ssl.site')
-rw-r--r-- | etc/nginx/sites-enabled/git-ssl.site | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/etc/nginx/sites-enabled/git-ssl.site b/etc/nginx/sites-enabled/git-ssl.site index 338dde4..d54418c 100644 --- a/etc/nginx/sites-enabled/git-ssl.site +++ b/etc/nginx/sites-enabled/git-ssl.site @@ -4,11 +4,25 @@ server { # listen [::]:80 default_server ipv6only=on; ## listen for ipv6 root /var/git; - # Make site accessible from http://localhost/ server_name git.taler.net; include conf.d/talerssl; + location ~ ^(.*?)\.git/(HEAD|info/refs|objects/.*|git-upload-pack)$ { + include /etc/nginx/fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; + fastcgi_param GIT_PROJECT_ROOT /home/git/repositories; + fastcgi_param PATH_INFO $uri; + fastcgi_pass unix:/var/run/fcgiwrap.socket; + } + + location /cgit { + root /var/www; + } + location / { - autoindex off; + include /etc/nginx/fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/cgit/cgit.cgi; + fastcgi_param PATH_INFO $uri; + fastcgi_pass unix:/var/run/fcgiwrap.socket; } } |