Friday 21 December 2007

Self certifying your IIS 6 website for SSL

Every time I need to enable https / ssl for a development or staging server I spend 30 minutes googling for instructions. Now I'm blogging just to remind myself how it's done:

Install the IIS 6 Resource Kit referenced at:
http://support.microsoft.com/kb/840671 from:
http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499

Obtain the site Id of the website you want to install the certificate for by clicking on the Web Sites major heading in the left hand side of the IIS admin tool and view the "Identifier" on the right hand side for whichever site you need. This is the site ID. further instructions at: http://weblogs.asp.net/owscott/archive/2005/07/29/421058.aspx

Run the following command replacing www.example.com with the host header of your site and 123456 with the site id obtained in the previous step (the /V:365 indicates that the certificate should be valid for 365 days, adjust accordingly):
"C:\Program Files\IIS Resources\SelfSSL\selfssl.exe" /T
/N:CN=www.example.com /V:365 /S:123456

No comments: