Home

Issue: 1619

Run "nuxt serve" under subpath (/prefix)

[issue link]

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:

screen shot 2017-09-08 at 17 17 17

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?

This question is available on Nuxt.js community (#c1444)