Tuesday, March 15, 2011

IIS: Multiple SSL sites on single IP address

I recently had to set up multiple sites on IIS with SSL and using just a single IP address.  This is pretty straight forward with non-SSL sites - you just specify a different host header for each of the sites. But with SSL, this wont work by default. You have 2 options:
1. specify a different port number for SSL for each of the sits. The disadvantage is that your users will have to access the sites as: https://subdomain.daksatech.com:445/ (if SSL was set up on 445)
2. The other option is to run a script that comes with IIS to enable SSL to work with host-headers. Here's how:
  • Set up wildcard domain on server (IIS)
  • Add certificate to site.
  • Add SSL site on port 443.
  • Run foll. script in command prompt:
    cscript.exe adsutil.vbs set /w3svc//SecureBindings ":443:"
    Eg: cscript adsutil.vbs set /w3svc/844934796/SecureBindings ":443:blogger.daksatech.com"

How to get siteid: In IIS, go to site properties, edit log location, this should show the site id in the LogFile name path. Eg: if the log path is W3SVC234234/exyymmdd.log; here "234234" is the siteid.

Location of adsutil.vbs:

%SystemRoot%\system32\inetsrv\adminsamples

or 
%SystemRoot%\inetpub\adminscripts\



7 comments:

Brian said...

This only works if you have a wildcard certificate.

cheap wildcard ssl said...

@ Brian,

Along with WildCard SSL Certificate, this also works with SAN SSL Certificate.

Anonymous said...

Is it possible to run multiple SSL sites with different SSL certificates on the same IP/port?

Coach Factory said...

true religion outlet, longchamp handbags, true religion, prada handbags, cheap michael kors, louboutin, michael kors, longchamp handbags, prada outlet, ray ban sunglasses, air jordan, true religion jeans, oakley sunglasses, tiffany and co, michael kors outlet, ray ban sunglasses, burberry outlet online, oakley sunglasses, nike air max, air max, michael kors outlet online, polo ralph lauren outlet, nike free, oakley sunglasses, michael kors outlet online, polo ralph lauren outlet, ray ban, air max, jordan shoes, coach factory, michael kors handbags clearance, nike free, nike roshe run, longchamp outlet, coach purses, toms shoes, nike air max, gucci outlet, nike shoes, michael kors, louboutin, louis vuitton handbags, tory burch outlet, coach outlet, coach outlet store

Coach Factory said...

hollister, hogan, mac cosmetics, mulberry, new balance shoes, nike huarache, abercrombie and fitch, rolex watches, lululemon, yoga pants, juicy couture outlet, timberland, juicy couture outlet, michael kors, mont blanc, nike air max, birkin bag, louis vuitton, vans, lancel, supra shoes, louis vuitton, nike free, abercrombie and fitch, ray ban pas cher, ferragamo shoes, nike trainers, oakley pas cher, ralph lauren, hermes, montre pas cher, roshe run, karen millen, north face jackets, nike roshe, wedding dresses, ralph lauren, reebok outlet, converse shoes, burberry, hollister, louboutin, beats by dre, longchamp, longchamp, louis vuitton, giuseppe zanotti, north face outlet, nfl jerseys, air max

Coach Factory said...

oakley outlet, canada goose outlet, chi flat iron, jimmy choo, valentino shoes, oakley sunglasses outlet, insanity, moncler, oakley vault, tn pas cher, cheap sunglasses, oakley, herve leger, ugg, moncler, marc jacobs, ugg boots, moncler, ugg boots, moncler outlet, gucci, mcm handbags, ghd, ralph lauren, canada goose, uggs on sale, canada goose outlet, babyliss pro, cheap oakley sunglasses, p90x3, canada goose, bottega veneta, cheap sunglasses, celine handbags, canada goose, soccer jerseys, instyler ionic styler, ugg boots, oakley sunglasses cheap, canada goose, ugg, asics gel, oakley sunglasses cheap, cheap oakley sunglasses, oakley vault, louboutin, oakley sunglasses outlet, soccer shoes, ray ban

Anonymous said...

air max pas cher
isabel marant
new balance sneakers
joe new balance outlet
ugg boots uk
toms shoes
nike roshe run
mulberry outlet
lebron james shoes
chi flat iron
uggs on sale
p90x workout
ysl shoes
belstaff outlet
cheap christian louboutin
tods shoes
woolrich jackets
kate spade
uggs for sale
cheap christian louboutin
michael kors outlet
giuseppe zanotti shoes
michael kors handbags
louboutin shoes
clarks shoes
nike air max 90
manolo blahnik shoes
ugg outlet
kate spade outlet
ugg boots sale
genuine ugg boots
uggs on sale
tods shoes
nike free 5