Nginx proxy on a different location than /

Hello, we are new to Vikunja and we are considering to migrate from Trello.

We would like to add extra security, for now, by just hide the application from /, so we would like to have:


By taking Reverse Proxy | Vikunja as hint we are successfully reach the api with:

location /v_api/ {

However when we try to use the ui, we get 404 because (via chrome inspector) we can see that many contents are load as:
instead of
(so missing v_ui as a context path)

Can you suggest a config that works in the way I explained?
Thanks a lot

After reading a bit the backlog, I found Hosting Vikunja in a subdirectory - #4 by kolaente

I’m able to to a rebuild, however I did not understand what exactly needs to be changed and where. Since grep -R publicPath has no result.

Can you point me in the right direction?
Thanks again.

You’ll need to pass the --base option to yarn build as described here: Building for Production | Vite

That’s a great starting point however:

yarn run build --base=/MYPATH
results in:
vite build && workbox copyLibraries dist/ --base=/MYPATH

So I find the trick by editing package.json directly from:
vite build && workbox copyLibraries dist/
vite build --base=/MYPATH && workbox copyLibraries dist/

so somehow the yarn argument is appended to the wrong command, but I understood the issue and I was able to fix it.
Now index.html and so on have /MYPATH everywhere.

Thanks a lot.

Ah yes in hindsight that makes sense. Didn’t think it through.

Glad you figured it out!