From 058fc57ff1ca2a46d09661d8e781182cb1b11f43 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 16 Jun 2021 20:57:24 +1000 Subject: [PATCH] Serve media files via nginx --- docker/nginx.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docker/nginx.conf b/docker/nginx.conf index 754a7321bb..fb1906f0fa 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -34,4 +34,15 @@ server { add_header Cache-Control "public"; } + # Redirect any requests for media files + location /media/ { + alias /var/www/media/; + autoindex on; + + # Caching settings + expires 30d; + add_header Pragma public; + add_header Cache-Control "public"; + } + } \ No newline at end of file