need some help. I have this nginx config
server { listen 80; server_name localhot; root /opt/apps; index index.php index.html index.htm index.nginx-debian.html; client_max_body_size 512M; server_tokens off; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log debug; error_page 404 /404.html; location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_read_timeout 600s; fastcgi_connect_timeout 300s; fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; } location /test.js { rewrite ^/test\.(.*)\.js$ /test.$1.js last; } location /api/ { rewrite ^/api/(.*)$ /api.php/$1 last; }}
i have file localhost/test.2.1.9.js, it is accessible but when i try to access localhost/test.js it returns 404.