summaryrefslogtreecommitdiffstats
path: root/modules/tozt/files/nginx/git-tls.conf
blob: f71ff67f07760cdb79a44735275514b69360d842 (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
server {
    listen       443 ssl;
    server_name  git.tozt.net;

    access_log  /var/log/nginx/git.access.log;
    error_log   /var/log/nginx/git.error.log;

    include ssl;

    root       /usr/share/webapps/cgit;
    try_files  $uri @cgit;

    location ~ ^/([^/]+)/releases$ {
        return 301 $scheme://$host$request_uri/;
    }

    location ~ ^/([^/]+)/releases/(.*)$ {
        alias /home/doy/releases/$1/$2;
        autoindex on;
    }

    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;
    }
}
# vim:ft=nginx