Hey,
I'm trying to serve nuxt behind Caddy. This is my Caddyfile:
my.domain.com
gzip
...
proxy /prefix localhost:3000 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
header_upstream X-Forwarded-Proto {scheme}
header_upstream X-Scheme {scheme}
header_upstream X-Script-Name /trailblazer-ui
}
However, when I navigate to my URL: my.domain.com/prefix I get an error because the server can't find the page:

So the server is working but something about the URL prefix is messing things up..
I had to install a reverse proxy fix plugin to make this work in Flask (Python framework) so I was wondering if there's is something similar I have to do here?
Hi. Did you tried adding router base to nuxt.config.js file? docs
```js
{
router: {
base: '/prefix/'
}
}
Oh thank you - I didn't find that in the documentation!
It seems to be the setting I was looking for 馃槃
Together with relative paths to assets:
<img src="~/static/trailblazer.png">
... it's working like a charm!
Thanks so much
how do you do relative paths to assets mentioned in the nuxt.config.js like so?
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/icon.png' },
{ rel: 'stylesheet', href: '/reset.css' }
],
I've just implemented this very thing but I can't for the life of me get the static paths to render correctly for SVG.
This works fine <img src="~/static/trailblazer.png"> but <svg><use xlink:href="~/static/symbols.svg#launch"></use></svg> does not.
Anyone seen this?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi. Did you tried adding router base to nuxt.config.js file? docs
```js
{
router: {
base: '/prefix/'
}
}