Before you begin

Prerequisites :

  • Must have the certificates provided by the Certificate Authority
  • Must have the Private Key

Setup and Configure

1. Bundle the Certificate files received from CA

cat >>

2. Upload the SSL Certificate Bundle and Private Key to the Server

scp @:/home/ubuntu/
scp @:/home/ubuntu/

3. SSH to the Server

$ ssh-add ;
$ ssh @;

4. Move the SSL Certificates to /etc/ssl

sudo mv /home/ubuntu/ /etc/ssl
sudo mv /home/ubuntu/ /etc/ssl

5. Change file permissions

sudo chmod 644 /etc/ssl/
sudo chmod 644 /etc/ssl/ 

6. Configure the Nginx configuration for your domain that will be using the SSL Certificates

sudo nano /etc/nginx/sites-available/default

server {
...

# Enter the following in the server block

# ---------------
# SSL
# ---------------
listen 443 ssl;

ssl_certificate /etc/ssl/;
ssl_certificate_key /etc/ssl/;

# ----------------
# Redirect to HTTPS
# ----------------
if ($scheme = 'http') {
return 301 https://$host$request_uri;
}

...
}

Previous 8 Easy Ways To Protect Your Online Privacy
Next Styles Of Software Infrastructure Management