I have four computers connected to a single switch – unconnected to the internet.
One of the computers (the large one in the picture) is more powerful than the others and is running Ubuntu, with three live Node.js web servers with different apps on different ports.
The other computers are running Windows.
I want the other three computers to access the web servers by calling a URL, for example
- files.bugsteins –> 192.168.0.5:3000
- chat.bugsteins –> 192.168.0.5:3001
- devices.bugsteins –> 192.168.0.5:3002
What is the best (priority to fastest set up time) way to accomplish this ?
Thus far I have tried Bind9 on the server machine and assigning static IPs and manual hardcoded DNS on the three client machines but it is not working and as I work on it, I figure I will post this question in case someone has a better way.
Best Answer
Not BIND.
Edit the
c:\windows\system32\drivers\etc\hosts
file on each desktop and point those names to 192.168.0.5.Add a web listener on port 80 on the server, somehow with your Node.js setup, or a basic webserver install (Lighttpd, NginX, Apache, or heaps of others) serving a static page with a JavaScript in it which looks at the URL and redirects the page to the appropriate port.
Taking from https://stackoverflow.com/questions/18022636/redirection-based-on-url-javascript something like this (untested):