diff --git a/rootfs/etc/nginx/nginx.conf b/rootfs/etc/nginx/nginx.conf index a2207e6..0cd423d 100644 --- a/rootfs/etc/nginx/nginx.conf +++ b/rootfs/etc/nginx/nginx.conf @@ -66,6 +66,12 @@ http { root /var/lib/nginx/html; } + location ~ ^/theme/.*\.(ico|jpg|jpeg|png|webp)$ { + root /var/www/html/public; + add_header Access-Control-Allow-Origin "*"; + try_files $uri =404; + } + # Pass the PHP scripts to PHP-FPM listening on socket location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+\.php)(/.+)$; @@ -90,12 +96,6 @@ http { expires 5d; } - location ~ ^/theme/.*\.(ico|jpg|jpeg|png|webp)$ { - root /var/www/html/public; - add_header Access-Control-Allow-Origin "*"; - try_files $uri =404; - } - # Deny access to . files, for security location ~ /\. { log_not_found off;