0% found this document useful (0 votes)
4 views

Webserver2 - Using Hostname

Uploaded by

jkprofesional00
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Webserver2 - Using Hostname

Uploaded by

jkprofesional00
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

This document provides steps to Install and configure IIS on a Windows Server 2016.

Here we
configure 2 web sites running on the same port 80. The default web site created by IIS installation
runs on port 80. The second web site will also run on port 80. As the IP address and port number
used by both websites is same, to differentiate between these 2 websites the hostname field is used.

To perform the steps : -

Login to the member server as administrator. Install IIS role if it is not installed already.
Go to Member server, and Create a new folder on C drive.

And in that folder create a file with extension as html. Provide any name to the file. Here we give the
file name as dac.html.

Open Server Manager -> Tools -> IIS manager

Right click on Sites -> Add Website


Select the folder where your website is stored. Port should be 80
And in hostname field enter the name by which the web site will be accessed. Here we give the
name as www.dac.com

NOW
Go to the Domain Controller ( Main Server where ADDS is installed ) as we have to configure DNS
to map above website name to the IP address of the web server. Go to Server Manager -> Tools ->
DNS.

Right click on Forward Lookup Zones -> New Zone. The following wizard will start.
Keep Primary Zone. Uncheck the checkbox of Store the zone in Active directory option. Click Next.

If you want to access the website by -> www.dac.com


Provide the only domain name in the zone name field that is -> dac.com

Click Next. Following screen appears.

Click Next.
Click Next on the above screen.

Click Finish on the above screen.


Now create a host record to map name to IP address.
Now right click on the domain you just created -> New Host (A or AAAA)
And give the IP address of your web server machine as shown below.

Click Add Host. Following message is displayed.


Similarly Create a new domain for the default website. And add a host record in it.
For e.g. default.lab and the host record for www and the same IP address as given above.

Now go to the Web server machine .


Server Manager-> Tools -> IIS manager
Double click on your new website -> Default Document

The following options are shown.

Click Add as shown in the blue colour on the right side. In the following window that opens, type the
hml file name given like dac.html.

Click OK.
Now Click the default Web Site. On the right side Click bindings option. In the bindings option that
opens, in the hostname field type the name for the default website like www.default.lab that you
created on the DNS server.

Now go to Internet Explorer, and search the website by name

http://www.dac.com

Similarly try opening the default website.

This is how you can run multiple web site on the same IP address and same port 80.

Following steps to be followed to add a new website for this server.


1. Create a directory on C drive and create an html page within it.
2. Open IIS manager and create a new web site. Provide the above folder path and in the hostname
field provide the name that will be used to access the website.
3. If the file name within the above directory is not index.html and something else then click web site
you just created in IIS manager. Select default document and add your html file name.
4. Go to main server. Open DNS console. Add a new zone(domain).
5. Create a host record in that zone.
6. Then open the website using its name from the browser.

You might also like