Skip to content

Instantly share code, notes, and snippets.

@mohiji
Created October 7, 2014 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohiji/5d652540799ee9c74342 to your computer and use it in GitHub Desktop.
Save mohiji/5d652540799ee9c74342 to your computer and use it in GitHub Desktop.
This confuses me. 127.0.0.1 works, localhost doesn't resolve?
solace:~ jfischer$ curl http://127.0.0.1:4000
Hi there.
solace:~ jfischer$ curl -v http://localhost:4000
* Rebuilt URL to: http://localhost:4000/
* Hostname was NOT found in DNS cache
* Trying ::1...
* connect to ::1 port 4000 failed: Connection refused
* Trying fe80::1...
* connect to fe80::1 port 4000 failed: Connection refused
* Failed to connect to localhost port 4000: Connection refused
* Closing connection 0
curl: (7) Failed to connect to localhost port 4000: Connection refused
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment