Configuring your Vista hosts file

Using your Windows file explorer, try to find the following file: 

C:\WINDOWS\System32\drivers\etc\hosts

Since this file is very sensitive regarding Windows security issues, a number of security settings may make it difficult for you to find or edit this file.  As a precaution, turn off WampServer when trying to edit hosts.  You may have to reboot and try editing hosts before opening any other programs.

If the etc subdirectory does not display, try typing the full name of the directory in the address bar of your file explorer.  Then try to open the file with Notepad++.

If this doesn't work, browse to Start -> All Programs -> Notepad++.  When the Notepad++ application is shown, right-click (or left-click if you've altered your mouse settings) Notepad++ and select 'Run as administrator'.  At the UAC prompt select 'continue'.  Browse to C:\Windows\System32\drivers\etc.  Display all files (*.*), not just text documents (*.txt).  Open 'hosts'.

The contents of your hosts file should be similar to this:

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1   localhost

Add lines such as the following:

127.0.0.1   www.mysite1.com
127.0.0.1 www.mysite2.com
127.0.0.1   www.mysite3.com

# mysite1, mysite2 and mysite3 can be substituted with any site name located as a subdirectory of c:\wamp\www\drupal-6.12\sites\

Make sure there is an empty line after the last setting.  Then save and close your file.

These lines create multiple system references, using the various names of your multisite Drupal web projects, to the hostname of your computer (customarily 'localhost').  Because of these additional settings in your host file, your Drupal installation is almost configured for multisiting.  We'll also have to modify httpd.conf and httpd-vhosts.conf to enable multisiting.



About Kipp Elliott Watson

Kipp Elliott Watson is a Drupaler (Drupalista?) who lives in Northern New Jersey and subscribes enthusiastically to the principles that have helped broaden Drupal's community and have brought Drupal to the forefront of the CMS revolution.  He is occasionally available for Drupal projects and would love to hear from you if you need a Drupal consultant.  His resume can be viewed and downloaded here.  

If you would like to learn about the Ideal Drupal Development Environment, visit: http://sites.google.com/site/theidealdrupalenvironment/

If you would like to add a Google Wave to a fresh Drupal installation, visit:

Drupal Developer for Hire

Looking to hire a Drupal Developer? Email me at Kipp period Watson at gmail period com. Just mention this website, so I'll know where you're coming from!