You can test SSL deployment by generating a self-signed SSL certificate. Keep in mind that self-signed certificates are not recognized as valid by any browser.
First, create an SSL key and CSR by running the following commands on your server:
mkdir -p ~/certs/YOUR_DOMAIN_NAME cd ~/certs/YOUR_DOMAIN_NAME (umask 077 && touch ssl.key) openssl req -new -newkey RSA:2048 -nodes -keyout ssl.key -out ssl.csr
You will be prompted to answer a few questions. There are two questions that are critical to answer correctly:
When done, you will have a directory called certs/YOUR_DOMAIN_NAME in your home directory that contains two files:
Once you have your CSR, run the following command to create a self-signed certificate:
openssl x509 -req -days 365 -in ssl.csr -signkey ssl.key -out ssl.crt
Your self-signed SSL certificate will be in the file ssl.crt.