From ed0d54cac2702bb3b952973b33ff2ede436dcfd4 Mon Sep 17 00:00:00 2001 From: Joshua Yun Date: Sun, 18 May 2025 18:13:14 -0500 Subject: fix: added new more wayland things and the cgit nginx config --- docs/server/cgit.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'docs/server/cgit.md') diff --git a/docs/server/cgit.md b/docs/server/cgit.md index 72db5ed..f685118 100644 --- a/docs/server/cgit.md +++ b/docs/server/cgit.md @@ -110,6 +110,36 @@ Add cgit configuration to caddy. } } +### Running cgit with nginx + + server { + listen 80; + server_name git.joshuayun.com; + return 301 https://$host$request_uri; + } + + server { + listen 443 ssl; + server_name git.joshuayun.com; + + // Other nginx configs, e.g. ssl here + + root /usr/share/cgit/; + try_files $uri @cgit; + + location ~* ^.+\.(css|png|ico)$ { + root /usr/share/cgit/; + } + + location / { + fastcgi_pass localhost:8999; + fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; + fastcgi_param DOCUMENT_ROOT /usr/lib/cgit/; + fastcgi_param PATH_INFO $uri; + fastcgi_param QUERY_STRING $args; + fastcgi_param HTTP_HOST $server_name; + } + } ## Cgit configuration -- cgit v1.2.3