Virtual Directory resolving to base IP
Before anything, incredible work. It's the snappy and beautiful.
Running Zorax in docker inside an internal network. With internal DNS pointing to it on *.home
I have two web servers serving static files at 192.168.178.10:8101/Server1 & 192.168.178.10:8102/Server2 I have created a HTTP Proxy server.home pointing to 192.168.178.10:8100 (Some other server) Next i have created two vdir's
| Virtual Directory | Destination |
|---|---|
| /Server1/ | 192.168.178.10:8101/Server1/ |
| /Server2/ | 192.168.178.10:8102/Server2/ |
When i hit either server.home/Server1 or Server2 it does not pull content from either of these. Instead of gives me 404 from the base proxy.
Is there something i'm missing in the way i have set this up? Is there a limitation? Or is this a potential bug. Thanks in advance.
@Coolicky Can you attach your log here? (Only the section where you are requesting the vdir) This is my test vdir settings
In theory you should be able to see some logs like these
[2025-11-14 07:09:25.612924] [router:vdir-http] [origin:a.localhost] [client: 127.0.0.1] [useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0] GET /imus/ 200
[2025-11-14 07:09:25.951236] [router:vdir-http] [origin:a.localhost] [client: 127.0.0.1] [useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0] GET /imus/index/script/dom-i18n.min.js 200
[2025-11-14 07:09:25.953825] [router:vdir-http] [origin:a.localhost] [client: 127.0.0.1] [useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0] GET /imus/index/img/mainlogo.png 200
[2025-11-14 07:09:25.954339] [router:vdir-http] [origin:a.localhost] [client: 127.0.0.1] [useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0] GET /imus/index/img/logo.png 200
@tobychui
Cannot see the vdir logs in the docker log output. Unless there is a verbosity flag, but could not see in the env. Got more info.
The vdirs work when site is accessed in https, but fail when i access the path on plain http. Additionally coming from NGINX if i set a path /Server1 to redirect to /Server2 the site will redirect relative to base. What i saw in Zoraxy is that it will append the url instead basically /Server1/Server2.
Is there some additional configuration i can do?
Hey @Coolicky
The vdirs work when site is accessed in https, but fail when i access the path on plain http.
Can I see your settings on that HTTP proxy rule and the URL you use to access it?
What i saw in Zoraxy is that it will append the url instead basically /Server1/Server2.
Well Virtual Directories is not Location in Nginx. Maybe you can check if you have correctly understand how Vdirs works by referencing this reply over here?
Site -> test.rain
Host
- [x] - Allow plain HTTP access
- [ ] - Disable Requests Logging
Destinations
- Upstream 192.168.178.20:8000
- [x] Monitor Uptime
- [ ] Use Sticky Session
- [ ] Disable Chunked Transfer Encoding
Virtual Directories
- /Server1/ 192.168.178.157:8101/Server1/
- /Server2/ 192.168.178.157:8102/Server2/
TLS/SSL
- test.rain | fallback certificate
- [ ] all options
All other options are default and not changed
Discovered where logs are :)
i've placed zoraxy adminUI at the /
-
http://test.rain gives me 307 to /login.html
-
https://test.rain gives me 307 to /login.html
-
https://test.rain/server1 gives me the server1's index.html
[2025-11-14 12:47:49.810702] [router:vdir-http] [origin:test.rain] [client: 192.168.178.157] [useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0] GET /Server1/ 200
[2025-11-14 12:49:58.615114] [router:vdir-http] [origin:test.rain] [client: 192.168.178.62] [useragent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Mobile Safari/537.36] GET /Server1/ 200
- http://test.rain/server1 gives me 307 to /login.html from zoraxy
No [router:vdir-http] logs
Thank You for the link. I guess vdir is not applicable in this case and i would have to rework the links.
http://test.rain/server1 gives me 307 to /login.html from zoraxy
This gives me a feeling that the alternative web server that handles HTTP traffic do not properly handle vdir requests. Will take a look at it.