blob: 7210dbc19074394776d513f3be93322a189b0f19 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
server {
server_name git.*;
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
root /var/lib/git/www;
# requests that should to go to git-http-backend
location ~ ^.*/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack)$ {
root /srv/git;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
fastcgi_param GIT_PROJECT_ROOT /srv/git;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param PATH_INFO $uri;
fastcgi_pass unix:/run/fcgiwrap.socket;
}
location @cgit {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
fastcgi_param CGIT_CONFIG /etc/cgitrc.d/crashbox;
fastcgi_param PATH_INFO $uri;
fastcgi_pass unix:/run/fcgiwrap.socket;
}
location / {
try_files $uri @cgit;
}
}
|