summaryrefslogtreecommitdiffstats
path: root/Caddyfile
diff options
context:
space:
mode:
authorArman Soltani <arman (at) rustymanta (dot) xyz> 2026-07-11 16:08:12 +0200
committerArman Soltani <arman (at) rustymanta (dot) xyz> 2026-07-11 16:08:12 +0200
commit692c1b4ff506cadf14cab802ac4d002b90c08598 (patch)
treed51fca33a50a3f2a43941d5ff2cd6f081a23904c /Caddyfile
downloadgit_serve-692c1b4ff506cadf14cab802ac4d002b90c08598.tar.gz
git_serve-692c1b4ff506cadf14cab802ac4d002b90c08598.zip
init
Diffstat (limited to 'Caddyfile')
-rw-r--r--Caddyfile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Caddyfile b/Caddyfile
new file mode 100644
index 0000000..d592e6b
--- /dev/null
+++ b/Caddyfile
@@ -0,0 +1,24 @@
+git.rustymanta.xyz {
+ @git {
+ header User-Agent git/*
+ }
+
+ route {
+ handle /cgit.* {
+ root * /usr/share/webapps/cgit
+ file_server
+ }
+
+ handle @git {
+ cgi * /usr/libexec/git-core/git-http-backend {
+ env GIT_PROJECT_ROOT=/git-repos GIT_HTTP_EXPORT_ALL=1 GIT_HTTP_RECEIVEPACK=0
+ }
+ }
+
+ handle {
+ cgi * /usr/share/webapps/cgit/cgit.cgi {
+ env CGIT_CONFIG=/cgitrc
+ }
+ }
+ }
+}