From 79b745248c83a61c476853434e8176b197c00808 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 2 Jan 2023 03:27:18 +0000 Subject: [PATCH] Quetre caching --- common/hedgedoc.conf | 4 ++-- common/quetre.conf | 4 +++- conf.d/quetre.conf | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/common/hedgedoc.conf b/common/hedgedoc.conf index 1b94603..f396c38 100644 --- a/common/hedgedoc.conf +++ b/common/hedgedoc.conf @@ -4,14 +4,14 @@ add_header X-I2P-Location http://vernfy3k7royqfe7pg6wgzj53ipltd5nb4acjtjmwgpqrkx subs_filter "hd.vern.cc" "$host"; location / { - proxy_pass http://127.0.0.1:5007; + proxy_pass http://127.0.0.1:3001; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location /socket.io/ { - proxy_pass http://127.0.0.1:5007; + proxy_pass http://127.0.0.1:3001; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; diff --git a/common/quetre.conf b/common/quetre.conf index bd2367d..f115b16 100644 --- a/common/quetre.conf +++ b/common/quetre.conf @@ -4,11 +4,13 @@ add_header X-I2P-Location http://vernnflenvsqccuanaun7yydnmturi4jkyxlyzhn6ultpje access_log /var/log/nginx/quetre-access.log; location / { - proxy_pass http://10.0.3.57:5068/; +# proxy_pass http://10.0.3.57:5068/; + proxy_pass http://crescent.vern.cc:5068/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_cache quetre; } if ($http_user_agent = "Mozilla/5.0 (compatible; Farside/0.1.0; +https://farside.link)") { diff --git a/conf.d/quetre.conf b/conf.d/quetre.conf index e3a4d48..34b5f0d 100644 --- a/conf.d/quetre.conf +++ b/conf.d/quetre.conf @@ -1,3 +1,5 @@ +proxy_cache_path /tmp/cache keys_zone=quetre:10m inactive=60m; + server { listen 80; listen [::]:80;