summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/nginx/nginx.conf25
-rw-r--r--etc/uwsgi/cgit.ini14
2 files changed, 39 insertions, 0 deletions
diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf
index 051b3407..072089c5 100644
--- a/etc/nginx/nginx.conf
+++ b/etc/nginx/nginx.conf
@@ -119,6 +119,31 @@ http {
# }
#}
+ # https://wiki.archlinux.org/title/Cgit#Using_uwsgi
+ # https://wiki.gentoo.org/wiki/User:Halcon/HOWTO_cgit_uwsgi_nginx
+ # https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html
+ # https://nginx.org/en/docs/http/ngx_http_uwsgi_module.html
+ server {
+ listen 80;
+ server_name git.flylightning.xyz;
+ root /usr/share/webapps/cgit;
+
+ # Serve static files with nginx
+ location ~* ^.+(cgit.(css|png)|favicon.ico|robots.txt) {
+ root /usr/share/webapps/cgit;
+ expires 30d;
+ }
+ location / {
+ try_files $uri @cgit;
+ }
+ location @cgit {
+ gzip off;
+ include uwsgi_params;
+ uwsgi_modifier1 9;
+ uwsgi_pass unix:/run/uwsgi/cgit.sock;
+ }
+ }
+
}
# vim: expandtab
diff --git a/etc/uwsgi/cgit.ini b/etc/uwsgi/cgit.ini
new file mode 100644
index 00000000..cd7e49c2
--- /dev/null
+++ b/etc/uwsgi/cgit.ini
@@ -0,0 +1,14 @@
+# https://wiki.archlinux.org/title/Cgit#Using_uwsgi
+# https://wiki.gentoo.org/wiki/User:Halcon/HOWTO_cgit_uwsgi_nginx
+# https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html
+# https://uwsgi-docs.readthedocs.io/en/latest/Options.html
+[uwsgi]
+master = true
+plugins = cgi
+socket = /run/uwsgi/%n.sock
+uid = http
+gid = http
+procname-master = uwsgi cgit
+processes = 1
+threads = 1
+cgi = /usr/lib/cgit/cgit.cgi