I have an ubuntu server running apache on localhost / port 80. It's domain is sub.domain.com
If I make a curl request to http://localhost on that machine it will error with 'couldnt connect to host' immediately.
If I make a curl request to sub.domain.com on that machine it will sit there in an infinite loop until it times out after a few minutes.
If I open sub.domain.com in my web browser on another machine it shows my html page.
If I make a curl request to sub.domain.com with another machine it will connect.
What's the deal here?