diff options
Diffstat (limited to 'roles/obsd_cgit/templates/httpd.d/cgit.conf.j2')
| -rw-r--r-- | roles/obsd_cgit/templates/httpd.d/cgit.conf.j2 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/obsd_cgit/templates/httpd.d/cgit.conf.j2 b/roles/obsd_cgit/templates/httpd.d/cgit.conf.j2 new file mode 100644 index 0000000..a7d0385 --- /dev/null +++ b/roles/obsd_cgit/templates/httpd.d/cgit.conf.j2 @@ -0,0 +1,24 @@ +server "{{ cgit_domain }}" { + listen on egress tls port 443 + tls { + certificate "/etc/ssl/{{ cgit_domain }}.fullchain.pem" + key "/etc/ssl/private/{{ cgit_domain }}.key" + } + + # Serve cgit static files (cgit.css, cgit.png) directly from disk + location "/cgit.*" { + root "/cgit" + no fastcgi + } + + # Explicitly route root (/) to cgit via fastcgi + location "/" { + root "/cgi-bin/cgit.cgi" + fastcgi socket "/run/slowcgi.sock" + } + + # Route any other cgit paths/actions via fastcgi + root "/cgi-bin/cgit.cgi" + fastcgi socket "/run/slowcgi.sock" +} + |