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'm migrating from old server into new server. my current domain is pointing to Old server and want to test before go live. The problem is how to connect to New Server for internal test. I dont know how to connect into it directly via server ip.

Server: CentOS 6, and use Directadmin.

share|improve this question
What do you mean by "server"? Do you mean a physical machine or a piece of software? And what do you mean by "connect"? Do you mean with a browser? Or something else entirely? – David Schwartz Nov 26 '12 at 3:22
up vote 2 down vote accepted

Connecting via an IP address may not work as you expect. The best thing to do here is to edit the hosts file on the system you are connecting from and add an entry that points to the new server for the new server. If your server is and it's ip address is then an entry like

It looks like the server you have is configured for [name based virtual hosting][1]. For this to work the client needs to provide a Host: header that the server can map to a suitable definiton e.g.


When you connect to your server using just an IP address, no suitable Host: header is provided


so the server returns the content from the default vhost (usually the first one configured).

For the purpose of your testing you need to provide a Host: header for To do this you need to arrange for to resolve to the IP address of your server. The easiest way to do this is to edit your hosts file asI said above.

share|improve this answer
my new server is running on virtual host if i point to IP directly it will not bring me to the but it will bring to server ip instead. Then how can i connect into virtual host via ip (example – RAGOpoR Nov 25 '12 at 9:59
absolutly perfect ! – RAGOpoR Nov 25 '12 at 12:16

What virtualisation are you using? You can usually bridge the adapter and give the virtual host an address on your local network, separate to your physical address. I do it all the time testing services on my workstation at w. Alternatively you can use NAT on the virtual machine and use the virtualisation software to forward the ports... Pretty sure virtual box and VMware allow this.

Or am I reading the question wrong?

share|improve this answer
Probably, my guess is the OP is talking about Name Based Virtual Hosting. – Iain Nov 25 '12 at 10:08

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.