From 4f4ca2ba5bc9fcb9afa164767688d3daa6d09ba8 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Tue, 28 Apr 2026 11:20:32 +0200 Subject: [PATCH] 370: Fix nginx static-file location to fall back to PHP The regex location for static files (jpg, png, etc.) had no try_files directive, so first-time requests to /media/cache/resolve/... 404'd without ever reaching Symfony. Adding the same fallback as location / lets LiipImagineBundle generate missing thumbnails on demand. Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 1 + infrastructure/nginx/etc/templates/default.conf.template | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7040a31..2ac94d66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ All notable changes to this project will be documented in this file. - Removed fixture length check from test. - Added vitest for frontend unit tests. - Updated infrastructure and image build for mono-repo. +- Fixed nginx static-file location to fall back to PHP so LiipImagineBundle can generate missing thumbnails (#370). ### NB! Prior to 3.x the project was split into separate repositories diff --git a/infrastructure/nginx/etc/templates/default.conf.template b/infrastructure/nginx/etc/templates/default.conf.template index 52269bea..7902373a 100644 --- a/infrastructure/nginx/etc/templates/default.conf.template +++ b/infrastructure/nginx/etc/templates/default.conf.template @@ -59,6 +59,7 @@ server { expires 1y; add_header Cache-Control "public, immutable"; access_log off; + try_files $uri /index.php$is_args$args; } # Screen client online check should just serve static files