Resolving Domainnames differently for different services
- by mlaug
Some time ago we had an issue with our network infrastructure and php with curl.
Our Network infrastructure is fairly simple.
LoadBalancer/Firewall = 5 servers
The Domainname of our website is set to the ip of the Loadbalancer, of course. But calling curl from one of the servers did result in a timeout. It appears that a server could not call for its own domain it is serving. So we had to set the domains via /etc/hosts to the sever itself.
But now We have implemented a Varnish in front of the Loadbalancer, which we want to automatically purge, once a change on a page happens. So now we need to call the domain www.example.com/url_to_purge. Sadly this call what be resolved to the server itself instead of the varnish, because of the /etc/hosts entries.
So now I am wondering, if you could resolve domain names differently for different services :)