This commit is contained in:
Iliyan Angelov
2025-11-25 11:16:05 +02:00
parent 4c8b71fe0d
commit 8823edc8b3
3 changed files with 39 additions and 16 deletions

View File

@@ -200,12 +200,22 @@ server {
}
}
# Frontend public images
location /images/ {
alias /var/www/GNX-WEB/frontEnd/public/images/;
# Frontend public images - must come before root location
location ~ ^/images/(.*)$ {
alias /var/www/GNX-WEB/frontEnd/public/images/$1;
expires 30d;
add_header Cache-Control "public, immutable";
access_log off;
# Ensure proper MIME types
types {
image/png png;
image/jpeg jpg jpeg;
image/gif gif;
image/svg+xml svg;
image/webp webp;
}
default_type application/octet-stream;
}
# Root location - Frontend (Next.js) - MUST be last