title: Set cURL to use local virtual hosts
body: <p>Using Apache or Ngnix I always create development sites based on real projects such as <code>http://project1.loc</code> which, after adding to my <code>.hosts</code> file, the browser has no problem using.</p>
  
  <p>However, when I attempt to make a cURL request (<code>http://project1.loc/post.json</code>) to that same URL I never get anything but a timeout. I'm assuming cURL doesn't care about my custom hosts and goes straight to a name server for it's info.</p>
  
  <p>How can I fix this?</p>
  
  <p><strong>UPDATE</strong>
  I set a custom header "HOST: <a href="http://project1.loc" rel="noreferrer">http://project1.loc</a>" and now I am getting 400 errors - but they are instantaneous so I'm assuming that cURL is at least using the hosts file...</p>