Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable SSL on IIS 7 / Windows 7 64bit

Tags:

iis-7

ssl

I'm trying to enable SSL in IIS 7 on my dev machine using a self signed cert. This is turning out to be quite frustrating.

I have followed THIS guide and several others that are almost identical. The configuration goes ok, but when I try and navigate to the website I get various errors.

http://localhost/index.htm - Results in HTTP Error 404 - Not Found.

https://localhost/index.htm - Results in Internet Explorer cannot display the webpage.

If I go into IIS and remove the https binding from the website then it works as expected (in http only obviously).

I'm gussing that there is something that needs to be set up / configured / installed in windows before this will work?

Thanks.

like image 856
Martyn Avatar asked Apr 04 '11 17:04

Martyn


People also ask

How do I enable SSL binding in IIS 7?

Create an SSL BindingClick Add... to add your new SSL binding to the site. The default settings for a new binding are set to HTTP on port 80. Select https in the Type drop-down list. Select the self-signed certificate you created in the previous section from the SSL Certificate drop-down list and then click OK.

How do I generate an SSL certificate in IIS 7?

In the Connections pane, locate and click the server. In the server Home page (center pane) under the IIS section, double-click Server Certificates. In the Actions menu (right pane), click Create Certificate Request.


1 Answers

You shouldn't need to reboot, it looks like IIS is not responding for some reason. Do you have Skype installed by any chance? It is unfortunately one of the most common reasons we see issues with ports.

So do this:

  1. Open IIS Manager, and select the server
  2. Click in the Sites page and make sure Default Web Site is Started.
  3. If it is not running click Start

Also to troubleshoot in case it is a port issue:

  1. OPen an elevated command prompt and type
  2. netstat -ano
  3. Search in there for something like 0.0.0.0:80 and :443

You will be able to see the Process ID (PID) that i using that port.

Also to troubleshoot SSL, you can run in the same command prompt "netsh http show sslcert" and you should see in there the certificate you assigned.

like image 114
Carlos Aguilar Mares Avatar answered Nov 07 '22 02:11

Carlos Aguilar Mares