summaryrefslogtreecommitdiff
path: root/git-server/cgit/nginx.conf
diff options
context:
space:
mode:
authorArseney300 <Arseney300@gmail.com>2026-02-20 04:56:52 +0700
committerArseney300 <Arseney300@gmail.com>2026-02-20 04:56:52 +0700
commitb68790d86a40294ba035b93e40b29f1a071359a1 (patch)
tree8eccd2412be8c287bf5de1d835955b44e8515cab /git-server/cgit/nginx.conf
parentee7d961c638c3baa0ba12b0451fe5104fecc95a9 (diff)
Add cgit web interface to git-server stack
Adds a lightweight cgit container (Alpine + fcgiwrap + nginx) that auto-discovers bare repos via scan-path and serves them read-only. Accessible at both cgit.swave.lol and swave.lol/cgit through the main nginx reverse proxy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'git-server/cgit/nginx.conf')
-rw-r--r--git-server/cgit/nginx.conf32
1 files changed, 32 insertions, 0 deletions
diff --git a/git-server/cgit/nginx.conf b/git-server/cgit/nginx.conf
new file mode 100644
index 0000000..64e35cb
--- /dev/null
+++ b/git-server/cgit/nginx.conf
@@ -0,0 +1,32 @@
+daemon off;
+worker_processes 1;
+error_log /var/log/nginx/error.log warn;
+
+events {
+ worker_connections 128;
+}
+
+http {
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+ sendfile on;
+
+ server {
+ listen 80;
+ server_name _;
+
+ # Serve cgit static assets directly
+ location /cgit-css/ {
+ alias /usr/share/webapps/cgit/;
+ }
+
+ location / {
+ fastcgi_pass unix:/var/run/fcgiwrap.socket;
+ fastcgi_param SCRIPT_FILENAME /usr/share/webapps/cgit/cgit.cgi;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param QUERY_STRING $query_string;
+ fastcgi_param HTTP_HOST $server_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+}