nginx sample config, quickly tested
authorhref <href@random.sh>
Mon, 11 Dec 2017 01:40:19 +0000 (02:40 +0100)
committerhref <href@random.sh>
Mon, 11 Dec 2017 01:40:19 +0000 (02:40 +0100)
installation/pleroma.nginx

index 1a6e1d56f4f41f9db7ac6eca775da87890069eba..d882908e4c8347024ca4d1acf961ef3a2804ab77 100644 (file)
@@ -1,3 +1,6 @@
+proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g
+                 inactive=720m use_temp_path=off;
+
 server {
        listen         80;
        server_name    example.tld;
@@ -21,6 +24,13 @@ server {
     location / {
         proxy_pass http://localhost:4000;
     }
+
+    location /proxy {
+        proxy_cache pleroma_media_cache;
+        proxy_cache_lock on;
+        proxy_pass http://localhost:4000;
+    }
+
     include snippets/well-known.conf;
 
-}
\ No newline at end of file
+}