summaryrefslogtreecommitdiff
path: root/roles/git/templates/nginx/cgit.conf
blob: 7d29608a0ec3268d472f2b9bb6ae28b0ff1097bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
server {
  listen       {{ services.git.port }};
  listen  [::]:{{ services.git.port }};
  server_name  {{ ( subdomains | selectattr('service', 'eq', 'git') | first ).full_domain }};

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

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

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