- Modify domain to hosts (C:\Windows\System32\drivers\etc\hosts)
- Open GitBash (comes with Git for windows install)
- Create certificate.conf file and project root
- Run OpenSSL command to generate .crt and .key (generate-files.sh)
- Install certificate on local machine In Windows open the start menu and type "certificates". Select "Manage Computer Certificates" Expand "Trusted Root Ceritification Authorities" Right click on "Certificates" and select "All Tasks" -> "Import". Click next Enter the path for the crt file. next next next to import the certificate
-
-
Save Psvensso/3fd5dfa1f2355d686ffdc4291f5f4307 to your computer and use it in GitHub Desktop.
Create React App - Windows SSL Setup
This file contains hidden or 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
HTTPS=true | |
HOST='dev.local.io' | |
SSL_CRT_FILE=certificate.crt | |
SSL_KEY_FILE=certificate.key |
This file contains hidden or 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
[req] | |
distinguished_name = req_distinguished_name | |
x509_extensions = v3_req | |
prompt = no | |
[req_distinguished_name] | |
C = GB # Enter 2 digit country code here | |
O = My Company # Enter company name | |
CN = dev.local.io | |
[v3_req] | |
keyUsage = critical, digitalSignature, keyAgreement | |
extendedKeyUsage = serverAuth | |
subjectAltName = @alt_names | |
[alt_names] | |
DNS.1 = dev.local.io |
This file contains hidden or 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
openssl req -x509 -newkey rsa:4096 -sha256 -keyout certificate.key -out certificate.crt -days 365 -config certificate.conf -new -nodes |
This file contains hidden or 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
127.0.0.1 dev.local.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment