title: How to fix `curl: (52) Empty reply from server` response on localhost?
body: <p>The problem is in my setting, because I am accessing localhost.</p>
  
  <p>When I execute in terminal:</p>
  
  <pre><code>curl http://localhost
  </code></pre>
  
  <p>The response is:</p>
  
  <blockquote>
    <p>curl: (52) Empty reply from server</p>
  </blockquote>
  
  <p>But it should say:</p>
  
  <blockquote>
    <p>curl: (7) Failed to connect to localhost port 80: Connection refused</p>
  </blockquote>
  
  <p><b>UPDATE:</b></p>
  
  <p>When I execute</p>
  
  <pre><code>curl http://localhost:3000
  </code></pre>
  
  <p>The response is:</p>
  
  <blockquote>
    <p>curl: (7) Failed to connect to localhost port 3000: Connection refused</p>
  </blockquote>
  
  <p><b>UPDATE(2)</b></p>
  
  <pre><code>sudo lsof -i :80
  </code></pre>
  
  <blockquote>
    <p>COMMAND     PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME</p>
    
    <p>acwebseca 42015 root   36u  IPv4 0x2e120362d0318e9b      0t0  TCP </p>
    
    <p>192.168.0.109:52299->151.101.129.69:http (ESTABLISHED)
    ...</p>
  </blockquote>
  
  <p>Do you have any ideas ?</p>