Here are the steps to create a self signed certificate. Replace [domain_name] with the actual domain name of the virtual host.
1. create key
1 |
openssl genrsa -out [domain_name].key 4096 |
2. generate certificate signing request
1 |
openssl req -new -key [domain_name].key -out [domain_name].csr |
3. generate the certificate
1 2 |
openssl x509 -req -days 365 -in [domain_name].csr -signkey [domain_name].key \ -out [domain_name].crt |