Access domain by ip

I’m trying to migrate a handful of sites from another hosting company to DH. Some are static sites, others are dynamic. My steps are as follows:

  1. Add Domain
  2. Create email users for new domain
  3. Create MySql DB for new domain
  4. upload files to new folder
  5. Test that site is functioning correctly
  6. Change Nameservers to bring site live on DH servers

However, I can’t figure out how to access my sites by ip address so that I can test them before flipping the nameserver switch. Can someone help?

You cannot access the sites by IP address - named-based virtual hosting requires that the browser specify a hostname that DreamHost has in its system.

In otherwords if your browser doesn’t know the hostname of the site, or the DreamHost web server doesn’t recognize the hostname the browser gives it, you are not going to get anything but an error message.

There are two tricks in the DreamHost Wiki you can try though - use DreamHost nameservers for external DNS resolution or bypass external resolution for the domain in question.

:cool: -//-

Thanks for the quick response. I tried to follow the 2nd (easier suggestion), but the directions (below) don’t seem to apply in OSX 10.5.

It says: " Mac OS X

In recent versions, you call up the System Preferences, then click on the Network icon in the Networking & Internet group. The first tab is the TCP/IP tab. Most recent versions let you set up multiple “Locations” which you can select from a drop-down menu. These are named and stored settings. You can save your current Location settings, then edit it to add the DreamHost DNS servers in the space provided, then save that Location as “DreamHost Testing” or some such. No need to write down the old addresses, and you can switch between the two configurations at any time!"

Any idea how to do it in Leopard?

I use the ‘vi’ text editor and go:
vi /etc/hosts

Then I add entries for my site(s):

For DNS, try editing /etc/resolv.conf
I’ve not tried this method in Leopard, but the file is there. The downside is that you’d need to add the DreamHost DNS servers first, which means that every DNS query you make uses the DH name servers. If you put the DH servers last, your query will find your old sites, which is why I recommend the /etc/hosts approach.