Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 2003 Server VM named Gemini, it has 2 IP addresses & I have a website on that box that listens on Is there anyway I can alias to dev.gemini. So in a browser on the network, users can type dev.geminiand they would be pointed to I'm not sure if I'm asking the right question. Is there a DNS or HOST thing I can do. Any links would be helpful.

Thanks, ~ck

share|improve this question

To handle port-remapping, you need a reverse proxy. Configuration will depend on which one you use, but it can look at the host header of the request and then forward to the correct server and port.

share|improve this answer

if you put dev.gemini in your hosts file users will be able to access it by typing dev.gemini:81

share|improve this answer

This is something you do on the host, not with DNS.

DNS points a name to an IP. So you can point to dev.gemini.

In order to have a web request normally bound to port 80 automatically go to port 81, you can do it as simple as a META HTTP redirect in the index.html of a web server listening on port 80 which redirects to port 81.

<META http-equiv="refresh" content="5;URL=http://dev.gemini:81/">

Then any request to dev.gemini would redirect to dev.gemini:81. Users would see that in their URL/address bar but it would work. It wouldn't redirect dev.gemini/something to dev.gemini:81/something. You could do that with more sophisticated URL rewriting rules within the web server. IIS has ways to do this, I'm sure. I know it's far easier with Apache.

share|improve this answer
Ya, but I imagine if the person is using 80 it is because something is already using it ... if not, better to make it listen on 80? – Kyle Brandt Aug 18 '09 at 17:51
Ideally he should just use the virtual server feature of IIS so that requests to www.gemini and dev.gemini can live on the same IP and port but have different virtual websites. – Kevin Kuphal Aug 18 '09 at 18:08

You can alias the IP to a hostname in the user's C:\WINDOWS\system32\drivers\etc\host file like:    dev.gemini

You can not however change the port with the hosts file. DNS has nothing to do with ports, it name to IP mapping only.

share|improve this answer

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.