From d7946fe2897255dcc0515662b9a65cd636bd48b9 Mon Sep 17 00:00:00 2001 From: Kai Hendry Date: Thu, 8 Oct 2015 08:56:05 +0000 Subject: [PATCH] Hotfix --- greptweet.service | 2 ++ nginx.conf | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/greptweet.service b/greptweet.service index 1b92f7a..8f73033 100644 --- a/greptweet.service +++ b/greptweet.service @@ -1,6 +1,8 @@ [Unit] # https://docs.docker.com/articles/host_integration/ # https://coreos.com/docs/launching-containers/launching/getting-started-with-systemd/ +# /etc/systemd/system/greptweet.service +# sudo systemctl enable greptweet.service Description=Greptweet After=docker.service Requires=docker.service diff --git a/nginx.conf b/nginx.conf index 9eafbce..a6ef302 100644 --- a/nginx.conf +++ b/nginx.conf @@ -27,10 +27,14 @@ http { rewrite ^/f/(.*)$ /create.php?id=$1 last; } - location ~ \.(txt)$ { - add_header Content-Encoding gzip; - gzip off; - } + location ~ \.(gz)$ { + add_header Content-Encoding gzip; + gzip off; + } + + location ~ \.(txt)$ { + rewrite ^/u/(.*)/ /u/$1/$1.txt.gz last; + } location ~* \.(svg|css|js)$ { expires 7d;