From 32f4c5319f0f353abefbe92c393f07aae4a62d81 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 22 Apr 2017 16:19:53 -0700 Subject: [PATCH] add nginx config for static assets --- Running-Mastodon/Production-guide.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Running-Mastodon/Production-guide.md b/Running-Mastodon/Production-guide.md index 53868da2..cc04253b 100644 --- a/Running-Mastodon/Production-guide.md +++ b/Running-Mastodon/Production-guide.md @@ -63,6 +63,12 @@ server { try_files $uri @proxy; } + location /assets { + # Serve static, checksummed assets directly from nginx as a perf boost + root /home/mastodon/live/public; + add_header Cache-Control "public, max-age=31536000, immutable"; + } + location @proxy { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;