summaryrefslogtreecommitdiffstats
path: root/roles/cgit/templates/cgit.nginx.conf.j2
blob: 142560548d313f10dfcb89d304378dcbe491e65f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
server {
    listen {{ cgit_port }};
    listen [::]:{{ cgit_port }};

    server_name {{ cgit_hostname }};

    root /usr/share/webapps/cgit;

    try_files $uri @cgit;

    location @cgit {
        fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.sock;
        fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
        fastcgi_param PATH_INFO $uri;
        fastcgi_param QUERY_STRING $args;
        fastcgi_param HTTP_HOST $server_name;
        include fastcgi_params;
    }
}