[Support]: Subpath on IP/Hostname
📝 Inquiry
Is it possible to set a subpath for the WUI?
So instead of 192.168.1.5:3000, I can instead use 192.168.1.5:3000/zt-wui, and all requests will use this subpath?
I don't see this option in the environment variables. This would allow for this application to run behind a reverse proxy.
https://ztnet.network/installation/options
🔖 Version
0.7.4
🔧 Deployment Type
- [x] Docker
- [ ] Standalone
💻 Operating System
Other Linux
🌐 Browser
Chrome
📚 Any Other Information That May Be Helpful
No response
Next.js (which ZTNet uses) supports a basePath property in next.config.ts that allows the application to run on a subpath.
However, this configuration is set at build time, meaning you would need to rebuild the application with your specific subpath.
Adding dynamic subpath support at runtime is not a trivial task. https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath
Ohh, that's too bad. Basically means you can't use it behind a reverse proxy, unless you dedicate a subdomain or different port for it.
you can do something like this:
location /ztnet/ {
proxy_pass http://localhost:3000/;
}
That causes a whole bunch of 404s, as it still tries to use the top level directory.
yeah, ztnet will still try to use /
i will look into this and see if we could add a runtime variable for subpath when i get time.