TL;DR: simple HTTP server is accessible locally, but how can I make it available remotely in order to view the served files from another computer on the network?
I'm using a zero-configuration command line HTTP server to serve up a web site (a directory containing an index.html
file).
I use either python -m SimpleHTTPServer
or the node.js http-server
(installed from npm
).
Accessing the web site locally is fine. If I serve the site on port 8090, then I can see it at localhost:8090
as expected.
But I'm unable to access it remotely, and herein lies my problem. I'd like the web site to be accessible on my network. (I have to be on VPN to access the server.)
If I try to telnet to the port, I get telnet: connect to address 192.168.122.215: Connection refused
.
Btw, port 8080 is already being used by Jenkins, which is why I'm using 8090 (not sure if that makes any difference).
I've seen https://stackoverflow.com/questions/14469267/node-js-on-mac-access-a-node-js-web-server-from-another-computer, but it doesn't help. When I run the command http-server . -p 8090
I get Starting up http-server, serving . on: http://0.0.0.0:8090
, which I believe means it should be accessible remotely.
I'm not really very familiar with networking/ports/etc so any guidance is greatly appreciated. I assume it's something to do with the port not being open, or some firewall setting, but this is alien to me.
Is what I'm trying to do possible? Can anyone help me make this web site available remotely on the network? Thanks for reading!