Binding to 0.0.0.0
tells the service to bind to all IP addresses on your machine. Rails server used to do this by default, but with 4.2 changed to binding only to localhost
.
Basically if it's only bound to localhost
then it will only respond locally to either localhost
or 127.0.0.1
which can't work through a DNS service because it's not a public IP address.
When you use 0.0.0.0
it will bind to localhost and to your routable IP address.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…