aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docker/frontend/etc/nginx/conf.d
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-12-03 09:50:12 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2022-12-03 10:03:09 +0100
commit0dbd4c12488bd365a86e4726b2ae689b2da86a7c (patch)
treec1c543aca8916cd93ce23900ba9a8c1f48529fb0 /docker/frontend/etc/nginx/conf.d
parentv4.0.3 (diff)
downloadcgitize-0dbd4c12488bd365a86e4726b2ae689b2da86a7c.tar.gz
cgitize-0dbd4c12488bd365a86e4726b2ae689b2da86a7c.zip
frontend: fix /mnt/cgitize being inaccessible to nginx
I've had problems with doing "FROM nginx" instead of "FROM alpine" in the past, but hopefully fixing a version is enough to prevent them.
Diffstat (limited to 'docker/frontend/etc/nginx/conf.d')
-rw-r--r--docker/frontend/etc/nginx/conf.d/default.conf20
1 files changed, 20 insertions, 0 deletions
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..dc27e85
--- /dev/null
+++ b/docker/frontend/etc/nginx/conf.d/default.conf
@@ -0,0 +1,20 @@
+server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+ server_name _;
+
+ location / {
+ include fastcgi_params;
+ fastcgi_pass unix:/run/fcgiwrap.sock;
+
+ fastcgi_param SCRIPT_FILENAME /usr/share/webapps/cgit/cgit.cgi;
+
+ # This looks stupid. Can I substitute any variable for $fastcgi_path_info?
+ fastcgi_split_path_info ^(/?)(.+)$;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ }
+
+ location /cgit/ {
+ alias /usr/share/webapps/cgit/;
+ }
+}