Nginx config for nodejs static missing something?

Every time we setup a vue3 app with a nodejs static site on cleavr we need to modify the nginx config to add /index.html to try_files as follows

  location / {
    include cleavr-conf/*.conf.pre;
    try_files $uri $uri/ /index.html =404;
    include cleavr-conf/*;

Without it, requests to vue route urls other than / result in a 404.

Are we doing something wrong?


I haven’t run into this particular issue - at least not when starting a vue3 app either via npm init vue@latest or with a new Nuxt3 app via npx nuxi init nuxt-app.

If you have an public repo, let me know and I can give it a try.