mirror of
https://github.com/netbootxyz/docker-netbootxyz.git
synced 2026-04-24 22:45:49 +03:00
[GH-ISSUE #32] Reverse proxying does not work #130
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/docker-netbootxyz#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hexadecagram on GitHub (Dec 27, 2022).
Original GitHub issue: https://github.com/netbootxyz/docker-netbootxyz/issues/32
Hello,
I am attempting to run docker-netbootxyz behind a reverse proxy so that I can have the administrative interface located at http://example.com/netbootxyz and the assets at http://example.com/assetsxyz. I am running netbootxyz as a Docker Stack (not just a service), with host-based rather than overlay networking which is better for maintaining stateful connections, and I use HAProxy and Apache to accomplish the reverse proxying.
Setting it up this way mostly seems to work just fine except that the webpage never progresses past saying "Getting Dashboard" with a pulsating disc, at which time I see this in Chrome's debugging console:
If I then examine netbootxyz-web.js, the issue is plainly obvious at line 9. As you will notice in my Apache configuration, I have attempted to remedy the situation by adding the line
ProxyHTMLURLMap /socket.io /netbootxyz/socket.io, which has no effect becauseProxyHTMLURLMapevidently does not have the proper context to match that line, so"/socket.io"never gets modified, and it looks like it's the wrong thing to do here, anyway.I can't recall the exact method that I've used in the past, but I know that I can work around this by piping netbootxyz-web.js through a shell script before it is served out by Apache. Nevertheless, anyone else that would like to reverse-proxy netbootxyz would likely bump into this issue, so it's worth mentioning. I will continue to work on this as time permits and post any findings.
Here are the relevant sections of my configurations.
docker-compose.yaml
haproxy.cfg
extra/proxy-html.conf
@PeterFalken commented on GitHub (Nov 28, 2024):
I'm interested as well, I'm running
netboot.xyzon kubernetes with Traefik providing the Kubernetes Gateway API. The code for the webapp defines the path for the socket here.