Search This Blog

Thursday, February 16, 2012

SharePoint 2010 setup SSL on multiple web applications on the same WFE server

In our environment I wanted to host both the MySites and the default web application on the same server and use the same IP - at the same time I wanted to setup SSL only on both these sites using a wildcard certificate.

The goal is to get to where people could browse portal.domain.com and mysite.domain.com from SSL only and have it work both inside and outside the firewall.

I setup SharePoint with the default web application and then configured mysites to run on SSL only.
So now I could get to https://mysite.domain.com without issue.

In teh Alternate Access Mappings I changed the URL for the default web application to https://portal.domain.com and set it to also be SSL.
Then I went into IIS and configured both to bind to the wildcard certificate.

Now the websites showed stopped in IIS and they would not restart due to a conflict.
What happens is that you have to add a host header to the default web application in IIS for it to restart - except you cannot do this in the binding screen.

MAKE A BACKUP PRIOR TO THIS STEP (c:\windows\system32\inetsrv\config\applicationHost.config)

To add a host header in IIS 7:
Run NotePad as an administrator
File/Open
c:\windows\system32\inetsrv\config
applicationHost.config

Open this file and search for your default Web Application name - it will appear in the file like:
site name="SharePoint - 80"...

Look for bindings and specifically the line "binding protocol=..."
On this line you will need to add your host header (portal.domain.com) after the :443: and inside the quotations - like this
"binding protocol="https" bindinginformation="*:443:portal.domain.com" />

Now save the file and go into IIS and you can start the websites.
If you want to ensure the default website is SSL only you go into IIS and edit the bindings on that web application and remove the port 80 binding.

They will now respond to SSL only.

No comments: