aboutsummaryrefslogtreecommitdiffstats
path: root/roles/obsd_cgit/templates/httpd.d/git.conf.j2
blob: 15e2f051e2f846ec6ffebc394fc86222c43993f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
server "{{ obsd_cgit_domain }}" {
  listen on egress tls port 443
  log access "{{ obsd_cgit_domain }}-access.log"
  log error "{{ obsd_cgit_domain }}-error.log"
  tls {
    certificate "/etc/ssl/{{ obsd_cgit_domain }}.fullchain.pem"
    key "/etc/ssl/private/{{ obsd_cgit_domain }}.key"
  }

  # Serve cgit static files (cgit.css, cgit.png) directly from disk
  location "/cgit.*" {
    root "/htdocs/cgit"
    no fastcgi
  }

  # Don't send a "Server: OpenBSD httpd" header.
  no banner

  # Route any other cgit paths/actions via fastcgi
  root "/htdocs/cgit/cgi-bin/cgit.cgi"
  fastcgi socket "/run/slowcgi.sock"
}