diff --git a/nextcloud/nginx.conf b/nextcloud/nginx.conf index 14d77f3..f5aa800 100644 --- a/nextcloud/nginx.conf +++ b/nextcloud/nginx.conf @@ -34,15 +34,15 @@ server { location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; } location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; } - # Serve static files directly — only if file exists on disk + # Serve static files directly, fall through to PHP for dynamic assets (e.g. theming) location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { - try_files $uri =404; + try_files $uri /index.php$request_uri; expires 6M; access_log off; } location ~ \.woff2?$ { - try_files $uri =404; + try_files $uri /index.php$request_uri; expires 7d; access_log off; }