From 3ceb7a0afd4115a057302a72886124ecf27cc2ac Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 22 Jul 2024 10:04:17 +0100 Subject: [PATCH] add the proxy arguments --- conf.d/bookstack.tryton.geeraert.eu.conf | 8 ++++++++ template/https.conf | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/conf.d/bookstack.tryton.geeraert.eu.conf b/conf.d/bookstack.tryton.geeraert.eu.conf index 94a4b13..d6cdd75 100644 --- a/conf.d/bookstack.tryton.geeraert.eu.conf +++ b/conf.d/bookstack.tryton.geeraert.eu.conf @@ -7,6 +7,14 @@ server { server_name bookstack.tryton.geeraert.eu www.bookstack.tryton.geeraert.eu; location / { proxy_pass http://bookstack_backend; + location ~* \.(html|css|jpg|gif|ico|js)$ { + proxy_cache cache; + proxy_cache_key $host$uri$is_args$args; + proxy_cache_valid 200 301 302 30m; + expires 30m; + proxy_pass http://bookstack_backend; + } + } location /.well-known/acme-challenge/ { root /var/www/certbot; diff --git a/template/https.conf b/template/https.conf index 30a4ee4..432e96e 100644 --- a/template/https.conf +++ b/template/https.conf @@ -7,6 +7,14 @@ server { server_name example.tryton.geeraert.eu www.example.tryton.geeraert.eu; location / { proxy_pass http://example_backend; + location ~* \.(html|css|jpg|gif|ico|js)$ { + proxy_cache cache; + proxy_cache_key $host$uri$is_args$args; + proxy_cache_valid 200 301 302 30m; + expires 30m; + proxy_pass http://nextcloud_backend; + } + } location /.well-known/acme-challenge/ { root /var/www/certbot; @@ -15,9 +23,6 @@ server { listen 443 ssl; # managed by Certbot ssl_certificate /etc/nginx/ssl/live/tryton.geeraert.eu/fullchain.pem; ssl_certificate_key /etc/nginx/ssl/live/tryton.geeraert.eu/privkey.pem; - #include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot - #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot - }