I’m not sure to completely understand your problem.
From what I understand, you have a vite.js application which is rendering some static files, and you would like to serve these files with nginx. Is it correct?
What do you mean by “when I refresh my URL on all endpoints”?
Yes this is correct,
I mean when i reload my page on the web, i’ve got a 404 error but only when my url is like https://example.com/endpoint/
no 404 when i’m on base url
The most common fix for this issue is the base in vite.config.js not being '/', if you’re using a vite.config.js set it to:
export default {
base: '/',
}
If you don’t have a vite.config.js, Vite defaults to base: '/', so the issue is likely somewhere else. In that case, could you share your nginx.conf and Dockerfile so I can take a closer look?