From 024ae3365ffa40b5d0b117577c552587b258ca7a Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 3 Oct 2026 11:41:33 -0700 Subject: Initial Commit --- roles/obsd_cgit/templates/cgitrc.j2 | 17 +++++++++++++++++ roles/obsd_cgit/templates/httpd.d/cgit.conf.j2 | 24 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 roles/obsd_cgit/templates/cgitrc.j2 create mode 100644 roles/obsd_cgit/templates/httpd.d/cgit.conf.j2 (limited to 'roles/obsd_cgit/templates') diff --git a/roles/obsd_cgit/templates/cgitrc.j2 b/roles/obsd_cgit/templates/cgitrc.j2 new file mode 100644 index 0000000..9633092 --- /dev/null +++ b/roles/obsd_cgit/templates/cgitrc.j2 @@ -0,0 +1,17 @@ +css=/cgit.css +logo=/cgit.png + +enable-git-config=1 + +cache-root={{ cgit_cache_dir }} +cache-size=1000 + +# Set the title and heading of the repository index page +root-title=Eugene Triguba's Git Repositories + +## Search for these files in the root of the default branch of repositories +## for coming up with the about page: +readme=:README + +virtual-root=/ +scan-path={{ cgit_repos_dir }} 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" +} + -- cgit v1.2.3