Configuring IIS bindings
In IIS, a binding consists of an IP address, a port, and a host header on which the web server listens for requests made to that website. The binding tells IIS how to route inbound HTTP/HTTPS requests.
In this recipe, you create a new website on
SRV1 and add bindings to enable the site. In this recipe, you only bind for HTTP.
You need to run this recipe on
SRV1 after installing IIS (which you did in the Installing IIS recipe).
How to do it...
- Import the
Import-Module -Name WebAdministration
- Create and populate a new page:
$SitePath = 'C:\inetpub\www2' New-Item $SitePath -ItemType Directory | Out-Null $page = @' <!DOCTYPE html> <html> <head><title>Main Page for WWW2.Reskit.Org</title></head> ...