From 32f4c5319f0f353abefbe92c393f07aae4a62d81 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 22 Apr 2017 16:19:53 -0700 Subject: [PATCH 1/2] 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; From 8bc1fd219415b3ce740739c2ac084e3e3be84828 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 22 Apr 2017 17:09:39 -0700 Subject: [PATCH 2/2] only add cache-control, remove comment --- Running-Mastodon/Production-guide.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Running-Mastodon/Production-guide.md b/Running-Mastodon/Production-guide.md index cc04253b..5785335c 100644 --- a/Running-Mastodon/Production-guide.md +++ b/Running-Mastodon/Production-guide.md @@ -64,8 +64,6 @@ server { } 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"; }