title: Why is localhost returning "502 Bad Gateway"?
body: <p>When I googled this issue, I noticed this is a common issue with nginx. But I never used nginx in my machine. I work with MAMP and occasionally with Python Bottle.</p>
  
  <p>Now whether my MAMP/Python server is on or not, I always get "502 Bad Gateway" whenever the address bar URL contains the word "<strong>localhost</strong>". Hence, I am having to use "<strong>127.0.0.1</strong>" in the meanwhile.</p>
  
  <p>I am really confused as I have no idea which particular event has caused this issue to start happening in my <a href="http://en.wikipedia.org/wiki/Mac_OS_X_Lion" rel="nofollow noreferrer">Mac&nbsp;OS&nbsp;X&nbsp;v10.7.5</a> (Lion).</p>