The University of Arizona

arizona.edu

Drupal Development: How to modify your Hosts file

The CALS Programming and Web Development Unit allows you to access your Drupal site while in development. To do this, you must modify your computer's "Hosts" file so that your browser will point to the CALS development server. Note this will affect all traffic bound for the web host. So if you want to view other pages on cals.arizona.edu, or view your live site, you'll need to undo the changes listed below.

 

On Windows

To access the CALS web development server:

1. Go to the Start Menu -> Accessories -> Right click on Notepad, *run as Administrator*.

2. Within Notepad

                File Menu -> Open
               Browse to...       C:\Windows\System32\drivers\etc
               Change file type from "txt files" to "All Files"
               Open hosts file

3. At the end of the file (last line) type the following (w/o quotes), "150.135.40.44         cals.arizona.edu"
               Save File. Close Notepad

4. Close and Re-Open your browser and go to http://cals.arizona.edu/mysite

 

Using a Mac or Linux

To access the CALS web development server:

1. Go to Spotlight and type in "Terminal" (w/o quotes)

2. Open the Terminal application

3. At the command line type: sudo pico /etc/hosts . When prompted, enter your Mac password

4. At the end of the file (last line) type the following (w/o quotes), "150.135.40.44 cals.arizona.edu"

5. Close the file by typing Ctrl-x, then the letter "y", then the Enter key.

6. Close browser and re-open. Go to http://cals.arizona.edu/mysite

 

If you're still not seeing the site, you may need to flush your cache on your workstation, instructions here:

http://www.techiecorner.com/35/how-to-flush-dns-cache-in-linux-windows-mac/

 

 

You also may need to clear your browser cache.