[support] Accessing multiple virtual sites on a development machine

Earnie Boyd earnie at users.sourceforge.net
Sun Feb 5 01:46:07 UTC 2012


On Sat, Feb 4, 2012 at 5:26 PM, Alison <alison at ssrv.org.au> wrote:
> Hi, having spent the last few days building a new Centos 6.2 (RHEL 6) webserver and migrating 5 low-traffic Drupal virtual sites to it - successfully, now looking to use the old server as a development machine. Brain is a bit worn out so this may seem a silly question, but how can I access the development machine sites? Localhost just gives me the first Apache default listed site, and using the domain names takes me to the new server. Tried listening on a different port, didn't help, nor did using 127.0.0.1 - loopback. Must be an easier way than setting up a local DNS server and changing development machine domain names.
>
> Suggestions please.
>

Add your dev sites to the /etc/hosts file.

127.0.0.1 dev.site1.com
127.0.0.1 dev.site2.com
etc.

How are you accessing the dev sites?  I mean are you using a browser
housed on the same host as the server or are you accessing from a
different client?  You'll need to add the same entries in the client
hosts file, if that is a windows PC it will be something like
c:\windows\system32\drivers\etc\hosts.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd


More information about the support mailing list