Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to know if and how I can do the following:

server A is the main server for www.aserver.com server B is a server that gives webservices, and one of the services is for activator (an internal webservice. it gives the service via xx.xx.xx.xx/activator/service.aspx

I want that when someone goes to ws.aserver.com/activator/service.aspx that it will actually pull the page at from xx.xx.xx.xx/activator/service.aspx (bserver) but it will look like ws.aserver.com/activator/service.aspx

ws.aserver.com's A record cannot point to bserver, because some requests for this host must be served by aserver. And for legacy reasons, the URL cannot change.

  • bserver only have an IP - it is not DNS managed
  • what should I write for the ws on aserver? ANAME? CNAME? subdomain? redirect? dns routing? So many names....
share|improve this question
If you're not able/willing to have DNS for ws point to server B, then the only option is to have it point to some other machine (possibly A) that acts as a proxy. But that's far less efficient. Why not just have DNS point to B? And all of your possible answers, with the exception of 'redirect', are DNS terms... which suggests that you do intend to make bserver "DNS managed" –  Flimzy Jun 30 '11 at 10:18
I am not sure what I said really. saying DNS managed, I mean that I will not have a DNS on the server. however, what do you mean: "just have DNS point to B"? I can't and don't want to have: ws.aserver.com go blindly to bserver.com . ws.aserver.com gives other services, as well as IIS7.5 websites. –  Saariko Jun 30 '11 at 10:23
So the 'ws' hostname is handled by multiple servers? Why not use two different hostnames, then? Maybe call bserver 'ws2'? –  Flimzy Jun 30 '11 at 10:25
If by "handled" you mean, some services are onaserver and some are on bserver - than yes. The reason I can't do "ws2" is that for 2 years now, the released version of the software, have ws.aserver.com/activator/service.aspx hardcoded in them. that's the main reason. –  Saariko Jun 30 '11 at 10:27

1 Answer 1

up vote 2 down vote accepted

It sounds like what you need is a reverse proxy server. This would be a machine that sits in front of your two HTTP servers, and based on the URL path, it directs the requests to the appropriate place.

This wouldn't have to be a physically separate box--you could potentially run that service on aserver or bserver, if you have sufficient resources there.

You could also accomplish this with simple HTTP redirects (which you seemed to elude to in your question) on aserver, but that's far less efficient, as it means the requesting client actually ends up making two requests.

Squid is a popular HTTP proxy that can be set up as a reverse proxy. I've never tried it, though. I believe Apache (probably with additional modules) can also do this itself, but again, I've never tried.

share|improve this answer
I will look at this HTTP Proxy, thanks –  Saariko Jun 30 '11 at 10:57
Apache's mod_proxy is a good way to do it as well, especially if you're already running apache on one of your two servers. –  gregmac Jul 14 '11 at 4:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.