Ask curl to connect to localhost, but send the Host header with a different value $ curl -H "Host: fake.com" http://localhost:8585 curl will hang until you kill the server.
Start a TCP server that simply echoes everything to the console $ nc -l 8585 Once the client connects, you should see this output. GET / HTTP/1.1 User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5 Accept: */* Host: fake.com