Last active
November 2, 2016 11:42
-
-
Save brainded/8564162 to your computer and use it in GitHub Desktop.
Create a locally signed Cert for a domain name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1 | |
Open 'Developer Command Prompt for VS2012' and run the following: | |
makecert -r -pe -n "CN=*.bobsburgers.local" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 | |
//We are using *.bobsburgers.local because this will allow us to use the single cert for all websites on the domain, like burgers.bobsburgers.local and fries.bobsburgers.local | |
Step 2 | |
Open IIS, expand Sites, right click first site, Edit Bindings, Add HTTPS binding, select *.bobsburgers.local cert, click ok | |
Step 3 | |
Go to mmc.exe, add snap in, Certificates, Computer Account, Local Computer, Ok | |
Under Cerificates, Personal, Certificates you will find your *.bobsburgers.local cert | |
Click and drap your *.bobsburgers.local cert into the Trusted Root Certification Authority\Certificates folder | |
Step 4 | |
Open 'Developer Command Prompt for VS2012' and run the following: | |
Change directory using the following command: | |
cd c:\Windows\System32\Inetsrv\ | |
Add the https binding for each subdomain: | |
appcmd set site /site.name:"burgers.bobsburgers.local" /+bindings.[protocol='https',bindingInformation='*:443:burgers.bobsburgers.local'] | |
appcmd set site /site.name:"fries.bobsburgers.local" /+bindings.[protocol='https',bindingInformation='*:443:fries.bobsburgers.local'] | |
Each subdomain will be accessible via 443 and not cause cert issues on the local machine! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment