help write nginx config for laravel in one diirectory and vue project in other dirrectory. Laravel should open /admin (for filament) and /api for vue. My nginx .conf
server {
server_name security-diplom.ru www.security-diplom.ru;
root /var/www/locked-storage-system/source-code/frontend/.output/public;
index index.html index.php;
location ~ .php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
location /admin {
alias /var/www/security/public/;
try_files $uri $uri/ /index.php?$query_string;
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
}
location / {
try_files $uri $uri/ /index.html;
location ~* .(?:css|js|jpg|svg)$ {
expires 30d;
add_header Cache-Control "public";
}
location ~* .(?:json)$ {
expires 1d;
add_header Cache-Control "public";
}
}
}
open filament on route /admin. Now return ‘File not found.’ in route /admin.