Created
September 29, 2022 18:27
-
-
Save thekavish/861cf9681249465fda8d7f8bfabd144a to your computer and use it in GitHub Desktop.
SSL Certificate in localhost
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
<VirtualHost _default_:443> | |
DocumentRoot "C:\xampp74\htdocs\myapp\public" | |
ServerName myapp.test | |
<Directory "C:\xampp74\htdocs\myapp\public"></Directory> | |
SSLEngine on | |
SSLCertificateFile "C:/xampp74/apache/conf/ssl.key/myapp.test.crt" | |
SSLCertificateKeyFile "C:/xampp74/apache/conf/ssl.key/myapp.test.key" | |
</VirtualHost> | |
# Refer -> https://zeropointdevelopment.com/how-to-get-https-working-in-windows-10-localhost-dev-environment/ | |
# winpty openssl req -new -sha256 -nodes -out idb-app.test.csr -newkey rsa:2048 -keyout myapp.test.key -subj "/ST=Jharkhand/C=IN/L=Ranchi/O=Alight Solutions/OU=iDB/CN=myapp.test/[email protected]" | |
# winpty openssl x509 -req -in myapp.test.csr -CA rootSSL.pem -CAkey rootSSL.key -CAcreateserial -out myapp.test.crt -days 512 -sha256 -extensions "authorityKeyIdentifier=keyid,issuer\n basicConstraints=CA:FALSE\n keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment\n subjectAltName=DNS:myapp.test" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment