21

I run localhost on my Windows 8.1 (Bootcamp on Mac) and need to enable ssl.

I have already default server certificates on 127.0.0.1 and localhost. I have the localhost one assigned to my websites on port 443.

https still returns security error so I need to work on http

My websites run on 44300 port (eg. localhost:44300) I tried to bind the certificate to 44300, still it didn't work.

How to make my locahost to work with https? Thanks

enter image description here

enter image description here

enter image description here

EDIT

The certificate is issued by localhost and is within Trusted Root Certification Authorities:

enter image description here

Btw I followed this thread to issue the certificate for my website: Enable SSL in Visual Studio

17
  • What is the contents of your certificate, i.e. is it even valid for the URL you use it? Commented May 14, 2015 at 15:25
  • @Steffen I believe they are built-in certificates as they were already there after I installed windows Commented May 14, 2015 at 15:37
  • Which does not say anything about the contents of the certificates. Maybe they are simply not suitable for what you are trying to do. Commented May 14, 2015 at 15:49
  • ok, so what I'm supposed to do @Steffen? I added self-signed certificate and it didn't work either. In other words - how can I check whether self-signed or built-in certificate is suitable for what I'm doing or not? Commented May 14, 2015 at 16:02
  • The certificate must match the hostname of the URL. Browser usually let you look into the certificate if you add it as trusted. Commented May 14, 2015 at 16:14

2 Answers 2

44

It is probably because it is not installed in Trusted Root Certification Authorities.

enter image description here

Solve this by starting mmc.exe.

Then go to:

File -> Add or Remove Snap-ins -> Certificates -> Add -> Computer account -> Local computer

Expand the Personal folder and you will see your localhost certificate:

enter image description here

Copy this into Trusted Root Certification Authorities - Certificates

The final step is to open Internet Information Services (IIS) Manager or simply inetmgr.exe. From there go to your site, select Bindings... and Add... or Edit.... Set https and select your certificate from the drop down.

enter image description here

Your certificate is now trusted:

enter image description here

Original answer:

https://stackoverflow.com/a/48790088/3850405

Sign up to request clarification or add additional context in comments.

7 Comments

@nickornotto issued to needs to be localhost
I redid the certificate and it is issues by localhost, see my edited post
@nickornotto Is the certificate really in Local computer - Trusted Root Certification Authorities? It won't work with Current User - Trusted Root Certification Authorities. Also click the lock icon in your browser and view what certificate is being sent. If you follow my link to original answer you will get it right.
ok, I have now run it in Chrome and it works! In Firefox though it doesn't work even though I cleaned cookies. But it works in MS Explorer too so the certificate is fine. Thanks for help
@nickornotto No problem! Please mark the answer as the correct solution if it helped you solve it.
|
8

Try to install Microsoft IIS Administration from https://manage.iis.net/get it will create a certification for your local server then use https://manage.iis.net/connect , get an Access Token and connect it check your localhost on https https://localhost

1 Comment

Apparently this site no longer exists :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.