From 2ed8c03e273e1b648b7def6a22d3648bd672dd8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Ku=C5=9B?= Date: Mon, 18 Aug 2025 19:28:34 +0200 Subject: [PATCH] error_log /var/log/nginx/error.log notice; # USTAWIAMY NOTICE --- nginx-config/https/https-bodypainter-eu.conf | 110 ++++++++++--------- 1 file changed, 56 insertions(+), 54 deletions(-) diff --git a/nginx-config/https/https-bodypainter-eu.conf b/nginx-config/https/https-bodypainter-eu.conf index 6eff7be..9de2d4f 100755 --- a/nginx-config/https/https-bodypainter-eu.conf +++ b/nginx-config/https/https-bodypainter-eu.conf @@ -1,58 +1,60 @@ - # Limitowanie requestów (pozostawiamy bez zmian) - limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=2r/s; - - # Konfiguracja cache (nowa część) - proxy_cache_path /var/cache/nginx05GB levels=1:2 keys_zone=STATIC:50m inactive=24h max_size=500m use_temp_path=off; - proxy_cache_path /var/cache/nginx2GB levels=1:2 keys_zone=MEDIA:100m inactive=7d max_size=2g use_temp_path=off; - - server { - listen 443 ssl; - server_name www.bodypainter.eu; + # Limitowanie requestów (pozostawiamy bez zmian) + limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=2r/s; + + # Konfiguracja cache (nowa część) + proxy_cache_path /var/cache/nginx05GB levels=1:2 keys_zone=STATIC:50m inactive=24h max_size=500m use_temp_path=off; + proxy_cache_path /var/cache/nginx2GB levels=1:2 keys_zone=MEDIA:100m inactive=7d max_size=2g use_temp_path=off;\ - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers HIGH:!aNULL:!MD5; - ssl_certificate /letsencrypt/live/bodypainter.eu/fullchain.pem; - ssl_certificate_key /letsencrypt/live/bodypainter.eu/privkey.pem; - - return 301 https://bodypainter.eu$request_uri; - } - - server { - listen 443 ssl; - server_name bodypainter.eu; - server_tokens off; - - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers HIGH:!aNULL:!MD5; - ssl_certificate /letsencrypt/live/bodypainter.eu/fullchain.pem; - ssl_certificate_key /letsencrypt/live/bodypainter.eu/privkey.pem; - - location / { - limit_req zone=ip_limit burst=20 nodelay; - proxy_pass http://arti24-container:3000; + error_log /var/log/nginx/error.log notice; # <-- USTAWIAMY NOTICE + + server { + listen 443 ssl; + server_name www.bodypainter.eu; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Port $server_port; - } - - # Nowe lokacje dla cache'owania - location ~* \.(jpg|jpeg|png|gif|ico|webp)$ { - proxy_pass http://arti24-container:3000; - proxy_cache MEDIA; - proxy_cache_valid 200 30d; - proxy_cache_use_stale error timeout updating; - proxy_cache_lock on; - proxy_cache_key "$scheme$host$request_uri"; - add_header X-Cache-Status $upstream_cache_status always; - expires 1y; - access_log off; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers HIGH:!aNULL:!MD5; + ssl_certificate /letsencrypt/live/bodypainter.eu/fullchain.pem; + ssl_certificate_key /letsencrypt/live/bodypainter.eu/privkey.pem; - proxy_ignore_headers Cache-Control Set-Cookie; - proxy_hide_header Set-Cookie; + return 301 https://bodypainter.eu$request_uri; } - - } \ No newline at end of file + + server { + listen 443 ssl; + server_name bodypainter.eu; + server_tokens off; + + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers HIGH:!aNULL:!MD5; + ssl_certificate /letsencrypt/live/bodypainter.eu/fullchain.pem; + ssl_certificate_key /letsencrypt/live/bodypainter.eu/privkey.pem; + + location / { + limit_req zone=ip_limit burst=20 nodelay; + proxy_pass http://arti24-container:3000; + + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + } + + # Nowe lokacje dla cache'owania + location ~* \.(jpg|jpeg|png|gif|ico|webp)$ { + proxy_pass http://arti24-container:3000; + proxy_cache MEDIA; + proxy_cache_valid 200 30d; + proxy_cache_use_stale error timeout updating; + proxy_cache_lock on; + proxy_cache_key "$scheme$host$request_uri"; + add_header X-Cache-Status $upstream_cache_status always; + expires 1y; + access_log off; + + proxy_ignore_headers Cache-Control Set-Cookie; + proxy_hide_header Set-Cookie; + } + + } \ No newline at end of file