To create a self-signed server certificate with OpenSSL, you need to complete the following steps depending
on your webserver type.
Apache
openssl req -new > new.cert.csr
openssl rsa -in privkey.pem -out new.cert.key
openssl x509 -in new.cert.csr -out new.cert.cert -req -signkey new.cert.key -days 1095
IIS
Create a certreq.txt by using the internet information services (iis) manager
openssl genrsa -des3 -out CA.key 2048
openssl req -new -key CA.key -x509 -days 1095 -out CA.crt
openssl x509 -req -days 730 -in certreq.txt -CA CA.crt -CAkey CA.key -CAcreateserial -out new.crt