This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
For converting .key file to .pem file, | |
Your keys may already be in PEM format, but just named with .crt or .key. | |
If they begin with -----BEGIN and you can read them in a text editor (they use base64, which is readable in ASCII, not binary format), they are in PEM format. | |
If the file is in binary, for the server.crt, you would use | |
openssl x509 -inform DER -outform PEM -in server.crt -out server.crt.pem | |
For server.key, use openssl rsa in place of openssl x509. |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).