This is Steve with Fpweb.net and in this video, we're going to do things a little differently. We’re going to be discussing IIS bindings. Now you’ll see in newer versions of Windows Server 2012 r2, you’re going to have the start button but you might not have that so you can go ahead and find your way to IIS. I’m just going to hit the Windows key here. Type in IIS and I’m going to launch IIS 7.5 because I’m on the new version server.
So, we will expand our tree out, and we will find that we've got our sites just below here. This is all the sites that are currently running on the server that we're working on. You will see we have our supportteam.onfpweb.net, which is our public site that we will be discussing today. We’ll go ahead, right click that, and go down to edit bindings. We’ll see that we have our host name and port number and IP addresses. These are the three main things are going to have on every binding for a website. We see our current IP address that is assigned there, and our host header.
Now what you can do is, you only need to have two of these three items to actually make a website run. So you see we have our inside address, so if we want to know what our outside address is, we’re going to do in an NS look up and then the site name, which is going to be supporteam.onfpweb.net, go ahead and type that in. An NS lookup’s default record is going to locate as an A record, which is what's needed to translate your URL into the public IP address that loads the site on the server. You’ll see that our IP address is going to be that 188.8.131.52 for our site which is added to our inside address which is set up in the binding. I’m going to close this out.
I've got a browser open up outside of the server here. That way we’re not doing local redirection. Now type the address in for the site that we're trying to load. I’m going to go ahead and sign in with my cache credentials to my admin account. You'll see that the site is going to load. We've got all three fields are filled out on server for the binding and the page will load. Now if we go back to the server and we remove that hostname take the host header out of it. We’re still going to have two of our field. We’re still going have our IP address and our port number. Let’s go ahead and save that then we’ll go back to the site, again off the server. I'm going to actually open up an incognito window, that way we’ve got no cached content, it will be completely clean window, it will reloaded it from scratch. Now our sites going to come right back up. Of course, I do have to authenticate again, since we have a clear cache. Here comes our site, still working without the host header entry in the binding.
Go back to the server, let’s open up our binding back up again on their. Let’s modify this even further. Got back to edit. This time let’s go ahead and remove the IP address, we’ll go ahead and put them on all unsigned. That means that no matter what request comes, any IP address on the computer will work. But, take a look at what we've got here. That binding is already assigned to another site. We can’t have any IP address on port 80 come in. Let’s find out why.
So go up to all the sites and we see that the default web sites also set up to work on any IP address on port 80. You can't have both running at the same time. There has to be a difference between all sites that are running which is why you typically have multiple IP addresses for multiple sites. Now what we'll do instead is, we’ll go back to our supportteam.onfpweb.net site and go back to our bindings. Let's go ahead and edit this again. Put our host name back in, so our site URL, remove it all from unassigned so we have any IP address port 80 with that host name. When the request comes in, we’ll see the page still load even though we've only got two of those entries filled out.
So what's happening is, the request comes in through DNS to the server the server says 'yes that's me’ it sees the request for the site name, it says 'your requesting on port 80’, default port for HTTP, which is what the site will load as. It says 'I can serve that request to you’ it will load the content that's on the server that's under that binding. Our page loads right up. We see Joe there. Now let’s go back to the server, and go back to our site. Go back to our bindings again. Let’s do one more thing. Let’s get this open. Let’s take the hostname out. Let’s leave it on all unassigned and change the port number to something else entirely. This should work. We've got no other ports being used other than 80 default HTTP and 443 for SSL, so use 1010. So, the site should come in, request any IP address and port 1010 should load up content that’s loaded in the virtual directory for that. Now if you try to load it, by default, again, it’s going to attempt to load by HTTP, which is port 80. So, you have to specify the port numbers. So, we’ll put port 1010 behind our site name, and attempt to load it.
Now, what we'll see is, the site is not going to load and there's two reasons behind this. First being, we don't have that port open behind the firewall, something you’ll have to consider when you working on this is to make sure that any requests that are coming in have to be allowed through any kind of firewall, hardware, or software you have set up. Second being when you add another application on top of it, such as SharePoint, SharePoint’s sites are built through the web application with a specific port number and if alternate access mappings isn't set up to allow the site on a specific port it is not going to recognize the application you’re attempting to load.
Now we take a look at that here real quick if we go back to our server and open Central Admin, which is only available on the server. To locate alternate access mappings, we will go into our application management. Then we’ll click on configure alternate access mappings. We do have to specify the collection that we're looking at. Let’s go over here, choose the site we have been working on this whole time. There’s our current alternate access mappings; these are the current mappings the sites allowed to load from. So we’ll add an internal URL, go ahead and put our public IP address with the port number. You’ll see we’ve got our binding under the default, under the internet zone. Let’s try to reload the page. Our site is loaded.
Now I hope this gives you a better understanding of IIS bindings, just remember those three components: the IP address, the host header, and port number. At any point, I meet at least two of those in order for the site to load properly. Remember, if you have an application that’s created on specific port, such as SharePoint, it has to be configured for that port as well or the site won't load, just as we saw.
OK, as always thanks for watching and if you have any questions feel free to reach out to Fpweb.net for any assistance! Thank you!