summaryrefslogtreecommitdiffstats
path: root/roles/cgit/templates/cgit.lighttpd.conf.j2
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-07-16 14:39:19 +0200
committerAhmed Abdelhalim <[email protected]>2026-07-16 17:02:52 +0200
commit756dc388bedf97b68449e919a6730788f730c7b8 (patch)
treece823916a242ea9d44194bbaf6da04d1596b935d /roles/cgit/templates/cgit.lighttpd.conf.j2
parentf79d1d829cdafebb5dbcd658d31ae89f2e53ce73 (diff)
Refactor pve cgit to use generic proxy
This is refactoring the PoC for deploying cgit on pve, to now move to a more standard deployment with dedicated agnonstic proxy role/container
Diffstat (limited to 'roles/cgit/templates/cgit.lighttpd.conf.j2')
-rw-r--r--roles/cgit/templates/cgit.lighttpd.conf.j224
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/cgit/templates/cgit.lighttpd.conf.j2 b/roles/cgit/templates/cgit.lighttpd.conf.j2
new file mode 100644
index 00000000..0fd1d535
--- /dev/null
+++ b/roles/cgit/templates/cgit.lighttpd.conf.j2
@@ -0,0 +1,24 @@
+server.port = {{ cgit_port }}
+server.bind = "{{ network_ipv4_address }}"
+server.modules = ("mod_cgi", "mod_rewrite")
+
+server.document-root = "/usr/share/webapps/cgit"
+server.pid-file = "/run/lighttpd.pid"
+
+mimetype.assign = (
+ ".css" => "text/css",
+ ".png" => "image/png",
+ ".ico" => "image/x-icon",
+ ".txt" => "text/plain",
+ ".html" => "text/html",
+)
+
+cgi.assign = (".cgi" => "")
+
+url.rewrite-once = (
+ "^/cgit\.css$" => "/cgit.css",
+ "^/cgit\.png$" => "/cgit.png",
+ "^/favicon\.ico$" => "/favicon.ico",
+ "^/robots\.txt$" => "/robots.txt",
+ "^(/.*)?$" => "/cgit.cgi$1",
+)