tjl2.com

A place to store useful stuff

 

[GENERAL] Generating a self-signed SSL certificate.

This is just a simple one-liner, but I always forget the command that is required to generate a self-signed SSL certificate (Ensim makes you lazy). If you need to generate an SSL certificate for private use or testing purposes, then just use the command below (all on one line):

openssl req -new -key /etc/httpd/conf/ssl.key/server.key -x509 -out /etc/httpd/conf/ssl.crt/server.crt -days 999

After running that command, you will need to provide information to be used in building the key and certificate files.

Once the certificate has been generated, you will need to restart your webserver.

top