summaryrefslogtreecommitdiff
path: root/files/nginx/cgit
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-03-23 14:09:58 +0300
committereug-vs <eugene@eug-vs.xyz>2022-03-23 14:09:58 +0300
commit29d16c46dfbc8eb9a31b10a5bf72f1330c890d5c (patch)
tree07bec8926ee075116c30191ce86652cc0ebbbb3e /files/nginx/cgit
downloadinfrastructure-29d16c46dfbc8eb9a31b10a5bf72f1330c890d5c.tar.gz
feat: add website and git-server playbooks
Diffstat (limited to 'files/nginx/cgit')
-rw-r--r--files/nginx/cgit20
1 files changed, 20 insertions, 0 deletions
diff --git a/files/nginx/cgit b/files/nginx/cgit
new file mode 100644
index 0000000..f31ec08
--- /dev/null
+++ b/files/nginx/cgit
@@ -0,0 +1,20 @@
+server {
+ server_name git.eug-vs.xyz
+
+ root /usr/share/cgit ;
+ try_files $uri @cgit ;
+
+ location @cgit {
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
+ fastcgi_param PATH_INFO $request_uri;
+ fastcgi_param QUERY_STRING $query_string;
+ fastcgi_pass unix:/run/fcgiwrap.socket;
+ }
+
+ # Serve static files
+ location ~* ^.+\.(css|png|ico)$ {
+ root /usr/share/cgit;
+ expires 30d;
+ }
+}