Using the HOSTS files to access ALP development sites
All clients with development sites hosted by ALP
For clients who have chosen to do so, ALP provides a development site to facilitate user acceptance testing and increase reliability and security. To access this development site, clients must create an entry in their computer's HOSTS file.
Make a backup of the HOSTS file prior to editing.
FOR WINDOWS USERS
Windows 7 and Windows Vista user account control block access to the hosts file, so it is important to "run as administrator." Some anti-virus applications may see editing the HOSTS file as potential malicious activity. It is important to disable any anti-virus and anti-spyware applications temporarily while editing the file.
- Back up the HOSTS file by using Windows Explorer (My Computer or Computer, or right-click the Start menu button and choose "Open Windows Explorer") to browse to C:\Windows\System32\Drivers\etc\ and copy the file called HOSTS to a safe location. This file does not have a file extension
- Go to Start --> All Programs --> Accessories, right-click Notepad, and choose "Run As Administrator"
- Go to File --> Open in Notepad
- In the file type dropdown (next to the textbox for the file name), change the value from "Text Documents (*.txt)" to "All Files"
- Open the file C:\Windows\System32\Drivers\etc\hosts
- Enter the IP address and hostname provided by ALP staff separated by a TAB (see example below)
- Save and close the file
*If you receive an error trying to save the file, you most likely did not choose "Run As Administrator" when you opened notepad.
FOR MAC USERS
- Back up the HOSTS file and copy the
file called HOSTS to a safe location. This file does not have a file
- Go to Applications -> Utilities -> Terminal and type $ sudo nano /private/etc/hosts into terminal (without the $ symbol at the beginning). It should prompt for an administrator password. Enter your Mac's administrator password.
- The hosts file contains some commented lines (lines starting with the # symbol), as well as some default hostname mappings (e.g. 127.0.0.1 – localhost). Simply enter the IP address and hostname provided by ALP staff.
- Save (Ctrl + o) and close (Ctrl + x) the file.
An example of a properly formatted HOSTS file:
# Copyright (c) 1993-2009 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
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# 184.108.40.206 rhino.acme.com # source server
# 220.127.116.11 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost