2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 03:56:43 +00:00

Serve media files via nginx

This commit is contained in:
Oliver Walters 2021-06-16 20:57:24 +10:00
parent 0821ead024
commit 058fc57ff1

View File

@ -34,4 +34,15 @@ server {
add_header Cache-Control "public"; 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";
}
} }