Resolving Domainnames differently for different services

Posted by mlaug on Server Fault See other posts from Server Fault or by mlaug
Published on 2012-05-22T10:00:36Z Indexed on 2012/10/11 15:39 UTC
Read the original article Hit count: 165

Filed under:

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 :)

© Server Fault or respective owner

Related posts about dns