Static GitHub Issues

[1619] Run "nuxt serve" under subpath (/prefix)

prev: node_modules not in root dir
next: separate the css file when generate html file

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?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1444">#c1444</a>)</em></sub></div>