Seems like a pretty logical first step; let's get a website started! Actually, you already have one, but it's pretty useless at the moment. As soon as you finished installing the IIS role, a standard website was started automatically so that you can verify everything is working as it should. Now we want to replace that default website with one of our own so that we can make some real use of this new server.
We will be accomplishing all work from our new Server 2016 web server. This one does happen to be domain joined, but that is not a requirement. You would be able to launch a website on a standalone, workgroup joined server just as easily.
Follow these steps to start your first website on this new IIS web server:
C:inetpub
. This is sort of the home folder that IIS creates and can be a good starting point for building your website. You do not have to create your new page within this folder, you could certainly set one up in another location, or even on a different drive altogether.NewWebsite
, or whatever you want it to be called.Default.htm
. To do this, I usually right-click and choose to create a new text file, and name this file Default.txt
. Then I either adjust Folder Options so that I can see and modify file extensions, or I simply open up a Command Prompt window and rename the file that way. However you do it, make sure that your Default.txt
gets changed to Default.htm
as the final filename.
Default.htm
file with Notepad or another text editing tool and enter some text. Thankfully, modern web browsers will properly display a page based on some plain text, so that we don't have to input valid HTML code. If you know how to program in HTML, even better, though I doubt you would be reading this particular recipe. Or maybe you have a preconfigured webpage file or set of files from a software installation; you could place those into this folder as well. I am going to simply enter some text in that file, which says, Congratulations, you are viewing our new website!
.Sites
folder and choose Add Website….C:inetpubNewWebsite
.
http://<webserver>
. For our particular example, we will go to http://web2
.
Starting a new website is perhaps the simplest task that can be accomplished in IIS, but it portrays the core functionality of this role. The purpose of running IIS in the first place is to publish websites. It is important to understand the location of this task and the places that you may have to reach inside the filesystem in order to modify or create websites of your own. Not everything is done from within the IIS Management window.
18.222.119.177