Rodney Buike - Founder and original lazy admin. MVP: System Center Cloud and Datacenter Management

Daniel Nerenberg - Lazy admin 2.0. MVP: Windows Expert - IT Pro

Disclaimer

These postings are provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

IIS 6.0 and SSL Host Headers

Using IIS, you can host multiple Web sites on a single server. There are a number of ways to distiguish between them but host headers allow you to host them on a single IP Address and Port. With IIS 6.0 you can also use host headers on SSL web pages as well.

IIS allows you to assign multiple Web sites the same IP Address/Port and distinguish them from each other with host headers. When an IIS server receives a request for a Web page, it looks for the HTTP header which contains the actual domain name requested. IIS can then use this information to “route” the request to the proper Web site. In order to configure SSL with host headers, you will need to obtain a wildcard server certificate. In order to do this you first must create the certificate request. Follow the normal procedure, however when you are asked to enter the Common Name, enter the name as *.domain.tld.



The next step is to configure a setting in the IIS metabase. The SecureBindings setting prevents unauthorized use of the certificate. In order to configure this you must run the following command for each web site.


cscript.exe adsutil.vbs set /w3svc/{site identifier}/SecureBindings “:443:{host header}”


You will replace {host header} with the actual name of the site. (i.e. site.domain.tld or server2.domain.tld) The last step is to change all the web sites to require SSL and this can be done with the following command


cscript.exe adsutil.vbs set /w3svc/{site identifier}/AccessSSL TRUE


Here you will need to replace {site identifier} with the Identifier listed in IIS.



 

Comments are closed.