Generating an SSL key and certificate signing request (CSR) is the first step in making your website securely available over HTTPS. There are two ways to do this.
Using ServerPilot is the easiest way to create a key and CSR.
First, go to your app's SSL tab in ServerPilot.
You'll see that SSL is disabled.
Now, enter your app's domain followed by your location and organization name. Click Generate Key and CSR.
ServerPilot will automatically generate a CSR and SSL key for your app.
If you don't want to use ServerPilot's generator or want more control over the creation of your SSL key and CSR, you can use the command line to create a key and CSR.
Run 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:
You can use the CSR to purchase a signed SSL certificate.