title: not able to access localhost via curl command in ubuntu?
body: <p>Im not able to access my localhost via curl command on terminal</p>
  
  <pre><code>curl -I 127.0.0.1  gives
  curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused
  </code></pre>
  
  <p>while </p>
  
  <pre><code>curl -I example.com is working fine
  </code></pre>
  
  <p>my host file is given below any idea ???</p>
  
  <pre><code>127.0.0.1       localhost
  127.0.1.1       jordanism
  # The following lines are desirable for IPv6 capable hosts
  ::1     ip6-localhost ip6-loopback
  fe00::0 ip6-localnet
  ff00::0 ip6-mcastprefix
  ff02::1 ip6-allnodes
  ff02::2 ip6-allrouters
  </code></pre>