Hints And Tips research knowledge archive
Tip# 42
Sponsored Links
 
Subject: Multihomed IIS server for local lan use only
Updated: Aug-17-2005
Rating: Not Rated
By: Rocky Moore - Member #: 1
Location: Klamath Falls, Oregon USA
Website: www.ReflectedThought.com
Category: Computers > Programming > General Web Development
Rate This Tip (10=Great):  1  2  3  4  5  6  7  8  9  10
20 acers ~ log home ~ only $799,000
If you want to build a web server on a local lan or on a single development machine and want to have multipe web sites on the single server using Windows Server (2000/2003) you can set it up much like a normal multihomed server.

You would use the host headers.  Since all sites will reside on port 80 you need a method to identify which web site the request is targeting.  A server on the open to the internet would simply use the domain name in the host header to determine which site to access.  When you are configuring your web site in IIS you have the option to specify the host header and you would usually use to host header entries, one for "mydomain.com" and one for "www.mydomain.com".

Well, for a local development machine or lan, you can configure your network "hosts" file:

C:\Windows\system32\drivers\etc\host

You would place an entry for each name to the web server IP or if it is a single development box, simply set to 127.0.0.1 for localhost.  An example would be:

127.0.0.1       localhost
127.0.0.1       anothername
127.0.0.1       www.anothername
127.0.0.1       yetanothersite
127.0.0.1       onemoresite

After this is entered and your network restarted you will be able to access the sites as:

http://anothername
http://yetanothersite
...

You would want to leave off the extention of ".com" since you do not want to override a site on the net.

When configuring the host headers of the web sites in IIS, be sure that you use the name as listed in your host file.  You can still use the "www." prefixes also.  Just remember not to use extentions and you will have to enter another entry in the hosts file that includes the "www."

Using this method you can setup a web server development machine to mirror your production server except for the extention.  Makes development and deployment much easier.

Extra tip: When you are using development tools that use FrontPage extentions, you will usually be prompted for login information to access they site since they will not be local host which is automatically added to IE as being unrestricted.  To solve this simply browse in IE to the site  (http://mysite/) and then  double click on the globe in the IE status bar and then add the name to the "local intranet" section.  Now you will not need to enter login information to access the local site from tools using FrontPage Extentions.

** NOTE: If you use this method and are running Windows XP SP1 or later or Windows 2003 Server SP1 or later, you might run into a security issue defined here:

http://support.microsoft.com/default.aspx?scid=kb;en-us;896861

I use Windows 2003 Server and chose the first option which is to disable it by:

1.	Click Start, click Run, type regedit, and then click OK.
2.	In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
3.	Right-click Lsa, point to New, and then click DWORD Value.
4.	Type DisableLoopbackCheck, and then press ENTER.
5.	Right-click DisableLoopbackCheck, and then click Modify.
6.	In the Value data box, type 1, and then click OK.
7.	Quit Registry Editor, and then restart your computer.


This worked great on my system.

[Submit DIGG for this tip]


-----------
Note: Use the tips posted on this site at your own risk. The tips are posted by the public and as such may or may not be valid.

Sponsored Links
Categories
hints and tips gold divider
Sponsor Sites To Visit
The Awakening
Spirit-Filled Christianity is
more than filling a pew !

Not producing fruit?
Healing, where to turn?
Provision, where to turn?
Lost, where to turn?

It is time for --TheAwakening !
The Saints In Light
Christian Thoughts on
Various Topics - Check it Out!

Click Here
Local Christians
Find other Christians
In your local area
Who share your beliefs!

Click Here
United Christian Voters
Tired of seeing your
Rights Vanish?
If all Christians would
Pull together, we can
bring Change Unite Now!

Click Here
Reflected Thought
Inventions ~ Ideas ~ Humor
Politics ~ Opinions ~ Thoughts
Software Development
Business And Stuff....

Click Here
XML RSS News Feed For Recently Posted Hints And Tips  RSS Feed
You can now get updates to the Recent Tips section by using RSS. The address is:

HintsAndTips.com/Rss.aspx

* Posting Tips *
To post a Tip, Recommendation or Tips Wanted, simply browse to the category you feel is a best fit for your post (click on the Recommention or Tips Wanted tab if fitting) and then click on "New Post" option.
(C) Copyright 1998-2009 All Rights Reserved By R & J Technologies - www.RJSoft.com