From 0f5dbcc3bdeb401f00c1cdcb7b0ef826003b5bd7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 26 Mar 2022 12:44:29 +0300 Subject: docker: add a frontend nginx image At first, I built a custom image at https://egort.name/. It had a rather long development history, and I just copied the files from there. --- docker/frontend/etc/nginx/conf.d/default.conf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docker/frontend/etc/nginx/conf.d/default.conf (limited to 'docker/frontend/etc/nginx') diff --git a/docker/frontend/etc/nginx/conf.d/default.conf b/docker/frontend/etc/nginx/conf.d/default.conf new file mode 100644 index 0000000..4dd9402 --- /dev/null +++ b/docker/frontend/etc/nginx/conf.d/default.conf @@ -0,0 +1,24 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + server_name _; + + location / { + index index.html; + } + + location /cgit/ { + alias /usr/share/cgit/; + } + + location /git/ { + include fastcgi_params; + fastcgi_pass unix:/run/fcgiwrap.sock; + + fastcgi_param CGIT_CONFIG /etc/cgit/cgitrc; + fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; + + fastcgi_split_path_info ^(/git/?)(.+)$; + fastcgi_param PATH_INFO $fastcgi_path_info; + } +} -- cgit v1.2.3