How to create website on IIS in Windows Server 2012 R2
IIS is Internet Information Services which is used to publish and host a website like Twitter.com. Website is a collection of relative webpages what include the home page. Web pages are written in HTML (Hypertext Markup Language) language. IIS is one of the most popular service of Microsoft. In this article, we’ll learn the steps to create website on IIS in Windows Server 2012 R2.
Steps to Host/ Create website on IIS on Windows Server 2012 R2
1. When you install IIS on Windows server 2012 R2, it create a default site. To check the default site of IIS, click on Start then select Internet Explorer and type http://server-name (Server-name is the name of Computer on which you have installed IIS) then hit Enter and you will get the default page.
2. Web designers are responsible to create website but for this practical, we’ll create a simple webpage. To create a webpage open Notepad and type content and then save it as Dot HTML (.html) file. We would not learn HTML in this practical, as it is out of scope for this post. Once the file is created, we’ll save the file in C:\IIS folder. By default all the IIS contents are saved in c:\inetpub\wwwroot.
3. To create website, open IIS window, click on start then select down arrow and select Internet Information Service icon.
4. On the IIS console, we have to stop the default site by clicking on stop. As the default site is running on port 80 and we need to create website which would also run on port number 80.
5. To create website right click on sites and then select Add website.
6. To create website, Define the name, physical path and bindings like Type of sites(http or https), IP address and Port of the website.
In “IP Address” option, you can even select an IP address on which you want this site to run.
In “Port” option define the port number for this site, you can even define the custom port e.g. 81 or 8080 or 8081, etc. In “Host Name” we can even define the domain name, we’ll talk about this in future article.
Click on Ok to continue.
7. We’ll get a warning message that port:80 is assigned to another site and we’ll not be able to start our website that’s why we have to confirm to add this duplicate binding by clicking on YES. This would not break anything as we already disabled “Default Website”.
8. On IIS Manager window we can see our website is created.
9. Open Internet Explorer to browse our site which we have created.
10. Type server name (http://servername) in address bar and hit enter. This would show the webpage that we created.