Search code examples
node.jsubuntunpmhttpserverport80

Ubuntu: Http-server on port 80 starting up, but can't access from browser?


So I have a web application being run on an http-server via npm. In my package.jsonfile, I have the line "start": "sudo http-server -a [my ip address] -p 8065 -c-1", and my app runs fine when I go to http://myipaddress:8065. However if I change the 8065 to just 80, in the json file (which is what I want), I still get the success message:

Starting up http-server, serving ./
Available on:
http://myipaddress:80

But when I go to the link, chrome givess me an ERR_CONNECTION_REFUSED. Anybody know what's going on?


Solution

  • Quick tests:

    Try to access this on as the localhost address, either localhost or 127.0.0.1 to shortcut any potential firewalls.

    Try to telnet to this address on port 80 to see what the server replies (if any).