Microsoft TechnologiesWindows Server

How to setup Internet Information Services (IIS) ?

IIS is a services introduce by Microsoft which we can used to host internal, external web sites.

In this article I will demonstrate the following,

•    Install IIS in server 02 which is member server of the domain environment. ( it doesn’t necessary to have domain environment to setup IIS, you also can use a standalone server in a workgroup environment as well )
•    Create a website in server02
•    Create a client computer the domain.
•    View the webpage in client pc.

For the IIS installation I will be using the following setup.

I have installed windows 2008 R2 server and add it to the sprint.local domain and it will be operate with name IISSRV.sprint.local.

The server will be running on ip 192.168.128.3

The Plan is to deploy IIS on this server and create a website their and try to access it through a client pc.

w1

w2

To Start the IIS installation, log in to the server as domain admin or enterprise admin, then go to start > administrative tools > server manager. Once it opens right click on “roles” and click add roles.

w3

Once the add roles wizard open up, select next to continue.

w4

From next window from the available roles select “Web Server(IIS)”. If its prompt any additional module to install when you select this, add them too as well.

w5

In next window it will give you the description about the role. Click next to continue.

w6

In next window you can select the role services as you required. The default selection is enough for the IIS basic functions. These services can add or remove later as per requirement. Once you select any role service in the right hand side it will give a brief description about the service. Here I have added all the services under “Application Development” and rest I keep default.

w7

In next window it will give a confirmation about the install. Click install to begin the IIS install.

w8

Once it finished the installation it will give the result page. Now we have installed IIS successfully.

w9

To open the IIS manager go to Start > Administrative tools > Internet Information Service (IIS) Manager

w10

w11

Now we have the IIS installed on the server. To check if the service is up, go to internet explorer and type http://192.168.128.3 or http://localhost from server.

w12

It will show the default issue page and we can confirm the service also running fine.

The next step is to create a web site under IIS and then test it. For the demo I am going to use domain name www.rebeladmin.com and point it to the IISSRV.sprint.local IIS server. To do that first we need to point this www.rebeladmin.com to 192.168.128.3 which is the ip address of the IIS server. To do this we need to have DNS server to host the records.

But in this demo since I am only going to use this site internally I do not need make it public. So I will use the domain dns services and add a DNS Zone for rebeladmin.com and then create the A records to point the url to IIS server.
This DNS setup will be completely deferent setup if we going to provide external access too.

To do this I have log in to the domain server which host the active directory environment DNS server as domain admin. Then to open DNS server, go to Start > administrative tools > DNS
Once DNS snap in open, expand the tree and right click on “Forward Lookup Zone” and Click on “New Zone”

w13

Next it will show the welcome screen. Click next to start.

w14

In next window select the zone type as “Primary Zone”

w15

In next window keep the default for the replication scope.

w16

For the zone name type rebeladmin.com and click next.

w17

In next window for the dynamic updates keep the default and click next.

w18

Next window is the confirmation and click finish to create the zone.

w19

Then it will add to the DNS Zone list. Then click on the zone name to go in to it.

w20

Now to create the A record right click on the right hand record area, and from the list select “New Host”

w21

In new window let “Name” field blank and in ip field put the ip 192.168.128.3. and then click on add host.

w22

Then next window it will give the confirmation.

w23

We also need to create A record for WWW. So if someone type rebeladmin.com or www.rebeladmin.com both will display the web page.

To do it use the same way but in Record window select type as following.

w24

Once it is done we ready with dns. Now from a pc in domain try to ping to rebeladmin.com and www.rebeladmin.com to see if its resolves to 192.168.128.3

w25

This confirms now the DNS is resolving fine.
 
The next step is to create the website for the rebeladmin.com.

To do that we need to go back to the IIS server. Then open the IIS Manager and select sites.

w26

Then right click on the sites, and select add web site.

w27

The next window is to define the parameters for the website. Put the site name as rebeladmin.com and from physical path section select a folder as home folder for the site. This is where we need to put the source files for the website to display.

Then in host name put the hostname as rebeladmin.com. Click ok at the end to setup the website.

w28

For the Host mappings we only add the rebeladmin.com. So we need to add www.rebeladmin.com as well. Then only users can access the web site with or without WWW.

To do it select the website and from the right hand panel click on bindings

w29

Once the binding window opens, click on add and in new window select the ip details and then put www.rebeladmin.com in to host name and click on ok.

w30

Now we have everything set. Next is to create test html page to test the website.
I have created new HTML called index.html with following test code.

<!DOCTYPE html>
<html>
<body>

<h1>WWW.REBELADMIN.COM</h1>

<p>The web site is working fine.</p>

</body>
</html>

The created file is copied to the rebeladmin.com home folder which has define with the website setup.
Now everything is ready. Now let’s go to pc called “TESTPC.sprint.local” which is in same domain and go to internet explorer and type www.rebeladmin.com or rebeladmin.com then it should display the page we created.

As we expected the page was displayed with and without www.

w31

w32

 

Related posts
Cyber SecurityMicrosoft Entra IDMicrosoft Technologies

Step-by-Step Guide : Process Entra ID Entitlement Management Access Package on-behalf of another user (preview)

Entra ID Entitlement Management access packages enable administrators to offer a self-service…
Read more
Azure servicesMicrosoft Entra IDMicrosoft Technologies

Step-by-Step Guide: Configure Entra ID lifecycle workflow to trigger mover task on user profile changes

The Entra ID lifecycle workflow is a feature of Microsoft Entra ID identity governance and Microsoft…
Read more
Cyber SecurityMicrosoft Entra IDMicrosoft Technologies

Step-by-Step Guide: How to setup Entra ID Restricted management Administrative Units ?

In my previous blog post, I discussed what Entra ID Administrative Units are and how they can be…
Read more
Newsletter
Become a Trendsetter

Sign up and get the best of RebelAdmin, tailored for you.

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *