Link to home
Start Free TrialLog in
Avatar of Varshini
Varshini

asked on

How to give the name to my websites in IIS7?

I have hosted nearly 20 websites in my local server. It is windows small business server 2008 and using iis7.

For each website currently i am accessing like
http://192.168.1.1:221/mysites1
http://192.168.1.1:223/mysites2
http://192.168.1.1:224/mysites3

is there any way to associate  a name to each  sites  instead giving ip address and port number ..

how can i set it up ?



Avatar of aamirhussain
aamirhussain

You need to setup a local DNS for IP to Name resolution.
Install DNS server on your network, whether it's on that server or a different one. You can also use the LMHosts file in Windows\System32\drivers\etc. LMHosts is creating a table of NetBIOS names. This is nice if you don't want to install a DNS server and if you don't want to have fully qualified domain names.
As for the port numbers, once you have proper name resolution set up, set all of your sites to port 80. And set your bindings in IIS for each site to match up with what site name you want.
Example:
http://192.168.1.1:221/mysites1 -> http://mysite1
http://192.168.1.1:223/mysites2 -> http://mysite2
http://192.168.1.1:224/mysites3 -> http://mysite3
IIS allows you to have multiple sites on the same port number. This allows you to have multiple sites on one computer without people having to remember/enter port numbers.
Avatar of Varshini

ASKER

how to do this in sbs 2008 ?
I'm assuming you have IIS installed already.
If you want to have a DNS server "Add Roles".
Select "DNS Server"
If you want to use LMHosts...just browse to C:\Windows\System32\drivers\etc and open the LMHosts file in notepad and add your names in there.
As for the bindings, you would right click the site in IIS and select "edit bindings". Then you can put in the name that differentiates the different sites and switch the port.
The nice thing about IIS is you can add a binding instead of editing an existing one. This way the old links continue to work.
Hi,

Do the following steps and it should work fine for you.

* Create the websites in IIS
* Right click on your first website -> Edit Bindings
* click on Add
* Select IP
* Enter host name -> domain.com
* Again click on Add -> Enter host name -> www.domain.com
 (The above process is used to share IP with multiple websites)
* Do the same steps fr your other websites

Now your IP: 192.168.1.1 works as shared IP for your all the websites. All the websites will run on port 80 or the port which you set for your all the websites.

* Now do the following entries in windows host file (Because I am able to see that you are using temporary website name):

xx.xx.xx.xx domain.com
xx.xx.xx.xx www.domain.com

If you have DNS then you can setup these website A record in your DNS file.
When i followed the above its shwoing IIS7 home page, it is not showing the web page.
Hi,

Do the following steps again and it should work fine for you.

* Create your first websites in IIS -> Select path of your website where web data is exist
* Right click on your website -> Edit Bindings
* click on Add
* Select IP
* Enter host name -> domain.com (Here domain.com your website name which you want to show on browser)
* Again click on Add -> Enter host name -> www.domain.com (www.yourwebsite.com)
* Give the same IP on www.domain.com
 (The above process is used to share IP with multiple websites)
* Do the same steps fr your other websites
* Now create a system user
* Go to your website is IIS -> Properties -> Assign Read, write modify permission to this user
* Click on Website -> In the Right side of IIS you will find our Basic Settings option
* Click on Basic Settings -> Connect As
* Enter the user which you recently created -> Enter the password (twice) -> Ok

Now your IP: 192.168.1.1 works as shared IP for your all the websites. All the websites will run on port 80 or the port which you set for your all the websites.

* Now do the following entries in windows host file (Because I am able to see that you are using temporary website name):

xx.xx.xx.xx domain.com
xx.xx.xx.xx www.domain.com

If you have DNS then you can setup these website A record in your DNS file.

There is no other steps to do This.
Hi,
Have you tried it again with new steps.
The new name to the site is working only in the server but it is not opening the page in the network machines.


ASKER CERTIFIED SOLUTION
Avatar of tanujchandna
tanujchandna
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank a Lot