Welcome to Sign in | Join | Help
in
Home Blog Forums

The Lazy Admin

IIS 6.0 and SSL Host Headers

Sponsor


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.

 





Published Friday, June 16, 2006 6:22 AM by rodney.buike
Filed under:

Comments

 

bkullman said:

I used this article to setup SSL Host Headers and it worked perfectly. One question I have is on the site identifier. My first web site was 1, which makes sense, but the next one was 1380357408... So I setup a test site just to see what it was assigned and got 857346... Is this something that I should be concerned about?

--------------------------------------------------------------------------------------------------------------------

This is how IIS manages it's sites. My understanding is the behavior is changed in Windows Server 2008. IIS will increment the sites which I agree is a bit more logical ;)

June 8, 2007 5:06 PM
Anonymous comments are disabled

This Blog

Powered By

 

Syndication

Sponsors

 
 
Get a free 5GB e-mail account @isalazyadmin.com

Certifications & Awards




All postings are provided "AS IS" with no warranties, and confer no rights.
Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.