title: Whats the difference between 127.0.0.1 and ::1
body: <p>For couple day I was fighting to set up apache installed from Homebrew on OSX 10.10 . For some reason everything was working but not the local domains that I was trying to setup via hosts file. No matter what I was doing only <a href="http://localhost" rel="nofollow">http://localhost</a> was available trough browser. And then I've changed one thing. </p>
  
  <p>Originally in /etc/hosts I was putting this line to set local domain:</p>
  
  <pre><code>127.0.0.1  imac.dev
  </code></pre>
  
  <p>And that did not work, but then I changed it to:</p>
  
  <pre><code>::1  imac.dev
  </code></pre>
  
  <p>which is how localhost was set up in hosts files and it works!</p>
  
  <p>Can anyone explain me why?</p>