[support] Accessing multiple virtual sites on a development machine

John Summerfield summer at js.id.au
Sun Feb 19 02:39:46 UTC 2012


Alison 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.
>
> Alison
>
>
>

Alison
When you have a new question, "Compose" or "Write" your message, do not 
"Reply" to an existing message.

Your email client creates special headers, such as this:
   References: <20120204102828.77866imznucwy40c at webmail.uniserve.com>
  <CACpPVysa2SJsqZ=WtqV9hZr4XJdpXLnwF1CMKuEyamFNNmqv0A at mail.gmail.com>
	<20120204125602.143174u4ge23jejm at webmail.uniserve.com>


which is one line, to allow others' email clients to group, or thread, 
messages into separate topics. This allows people to pick on topics of 
interest to them rather than read all the messages, and to easily see 
other contributions to the topic before responding.

Someone who's chosen to ignore the "automated updates" topic might not 
see your question at all, and that would be a shame if they had a good 
answer and the inclination to provide it.

I am going to assume that your server is hosted, like mine, at home on 
an ADSL router.

Clearly, you use Windows on your desktop, so I suppose you are 
comfortable with both Windows and Linux, and that you already have a 
network with everything on it.

While it's not strictly necessary, I use BIND to convert hostnames to IP 
addresses and addresses to hostnames on my LAN. There are other 
solutions such as hosts files (which I find a little yucky) and dnsmasq.

I use a top-level domain or lan, and because I feel I need one, an 
intermediate domain ms, so one of my development machines is called 
"chessdev.ms.lan" and I can find it by name from anywhere on my LAN.

js.id.au is hosted on a CentOS 5 system, but mostly I develop on Debian.

Depending on the capacity of your old system, you might use 
virtualisation. This allows you to any Linux distribution (or, subject 
to licensing) Windows (or even a BSD or free Solaris) for development, 
and any of Windows and Linux as the host OS.

I've given up on xen and KVM, neither seems to me very reliable, so I 
now download virtualbox and use that. Note that it does not play very 
well at all with KVM or xen. Virtualbox or one of the others.

Using virtualisation has some advantages over Apache or druapal virtual 
sites that might appeal:

You can easily test with different releases of Drupal, without any 
worries about getting confused about what's where.

You can easily test with different database software, again with clearer 
separation.

You can easily test with different releases of the same database software.

You can set up "small" computers. A useful Debian system can run in 128 
Mbytes of RAM and have 4 Gbytes of disk. You can easily backup the whole 
thing with just a disk image.


Note, I use Debian for these systems because
1. It's easy to set up a virtual machine with small resource 
requirements I don't normally install a GUI.
1a. If I do want a GUI, there's quite an assortment of desktop 
environments to choose from, many of them very lightweight.

2. Like Ubuntu, it has an enormous array of software available, more 
than Fedora. Unlike Ubuntu it's all supported.



More information about the support mailing list