fix(nginx): ^~ /assets/ alias for Views/assets/ — BIT-24927 #3

Merged
spark merged 1 commits from fix/bit-24925-crm-admin-pathmanager into master 2026-06-10 20:04:57 +01:00
+32
View File
@@ -0,0 +1,32 @@
server {
listen 8080;
server_name _;
root /opt/moneyflix/crm;
index index.php;
# ^~ stops regex matching; serves assets from Views/assets/
location ^~ /assets/ {
alias /opt/moneyflix/crm/Views/assets/;
expires 1d;
access_log off;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(js|css|png|jpg|ico|gif|svg|woff2?|ttf)$ {
expires 1d;
access_log off;
}
location ~ /\. { deny all; }
location ~ \.env$ { deny all; }
}