问题
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
EDIT
The certificate is issued by localhost and is within Trusted Root Certification Authorities:
Btw I followed this thread to issue the certificate for my website: Enable SSL in Visual Studio
回答1:
It is probably because it is not installed in Trusted Root Certification Authorities
.
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:
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.
Your certificate is now trusted:
Original answer:
https://stackoverflow.com/a/48790088/3850405
回答2:
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
来源:https://stackoverflow.com/questions/30240014/enabling-ssl-on-localhost-iis