From 6f3ff9eb46e87768c8c0de12262dfde574d1d5e3 Mon Sep 17 00:00:00 2001 From: Luis Alvergue Date: Fri, 15 Nov 2024 17:38:42 +0000 Subject: [PATCH] feat: let nginx serve uploaded files in a deployment --- appcontainer/nginx.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/appcontainer/nginx.conf b/appcontainer/nginx.conf index b0fe492bdb..2ea16be1f2 100644 --- a/appcontainer/nginx.conf +++ b/appcontainer/nginx.conf @@ -72,6 +72,13 @@ http { add_header Cache-Control public; } + # path for uploaded files + location /uploads/ { + alias /home/calitp/app/data/uploads/; + expires 1y; + add_header Cache-Control public; + } + location / { # checks for static file, if not found proxy to app try_files $uri @proxy_to_app;