Help us understand the problem. What is going on with this article?

RailsでWEBrickが127.0.0.1ではなく0.0.0.0で待ち受ける理由

More than 5 years have passed since last update.

Railsでは起動ログを見ると 127.0.0.1 じゃなくて 0.0.0.0 で待ち受けてるのって何でだろう?
そもそも 0.0.0.0 ってなんだったっけ?

=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server

と思って調べたら、0.0.0.0 は「全てのアドレスを示す」ので外部からでも接続できるってことらしい。
そういえばVPSで動かしてみて試したような気がする。

Why does Ruby on Rails use http://0.0.0.0:3000 instead of http://localhost:3000? - Stack Overflow
http://stackoverflow.com/questions/1478747/why-does-ruby-on-rails-use-http-0-0-0-03000-instead-of-http-localhost3000

ironsand
思いついたアイデアをすぐに形にできる能力を身につけたいのでRailsを頑張って習得中。仕事ください。
http://programming.ironsand.net/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away