Hi ---
Feeling a wee bit foolish asking this question but after days of research I keep coming up with a headache and conflicting information, which is hard on a perfectionist!
Situation:
- me: server admin noob & only days old here
- OS: Hardy Heron/Ubuntu 8.04 LTS
- CMS: Drupal 6.16 -- to be installed using multisite configuration, which enables Drupal to run multiple sites from one install with each (dev & prod) site using its own mysql database
- Goal:To have test sites and live sites on one linode, although this may change later
Problem
I am trying to figure out the correct entries for the /etc/hosts file. On my Win XP box locally and a Win 2003 server I was able to work on remotely for awhile, it was simple. I just added the registered domain names and unregistered names to the windows hosts file, associating them with the IP...and then I set up virtual hosts in the httpd file of apache, each pointing to the drupal index.php file used for install.
When I read the various how to's for /etc/hosts in ubuntu, I read what seems to me conflicting information. In one instance, I read that one just does this entry (x=numbers)
127.0.0.1 localhost
69.164.XXX.XXX registered domain name, sans www but with extension .com or .org
Elsewhere I read that one must use a three column entry and machine name and domain name:
127.0.0.1 localhost.localdomain localhost #localdomain??
69.164.xxx.xxx magdalen.test magdalen #magdalen is machine name; test is name of dev site
69.164.xxx.xxx magdalen.learn.uidaho.edu magdalen
1. So what's the scoop with the three column versus two column entries? When do I use which?
2. Do I use the machine (host name) or not?
3. What's with the localhost.localdomain entry??
4. In my current set up on Win boxes, I have fake.domain.local (example) associated with localhost IP on winxp local PC (dev. server). And, I have real.domain.com associated with public IP on the live server. I solved file path problems that occur when loading dev files to live site by adding a patch with an array in it to Drupal 6x core that causes
http://fake.domain.local to call the drupal/sites/water folder and
http://real.domain.com to do the same. Is it possible to do this same set-up on my linode?
THANK YOU in advance!!