How to Set Up GoDaddy SSL in Amazon EC2

Setting up an SSL certificate on your server is crucial for ensuring secure communication between your server and clients. In this guide, we’ll walk through how to install a GoDaddy SSL certificate on an Amazon EC2 instance.

How to Set Up GoDaddy SSL in Amazon EC2

Setting up an SSL certificate on your server is crucial for ensuring secure communication between your server and clients. In this guide, we’ll walk through how to install a GoDaddy SSL certificate on an Amazon EC2 instance.

Prerequisites

Before we start, you need to have:

  • An active Amazon EC2 instance
  • A domain name registered with GoDaddy
  • An SSL certificate purchased from GoDaddy

Step 1: Generate a Certificate Signing Request (CSR)

First, you’ll need to generate a Certificate Signing Request (CSR) from your EC2 instance. This involves creating a private key and a CSR file.

Log into your EC2 instance and create a new directory to keep your CSR and private key:

mkdir ~/ssl && cd ~/ssl

Next, generate your private key and CSR:

openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr

Replace yourdomain with your actual domain name. Follow the prompts to provide your certificate request information.

Step 2: Validate Your Domain with GoDaddy

GoDaddy needs to verify that you own the domain for which you’re applying the SSL certificate.

After creating your CSR, log into your GoDaddy account. Navigate to your SSL Certificates page. Click on Set Up for the certificate you want to configure.

Paste the contents of the CSR you generated into the CSR box on the GoDaddy setup page. Follow the instructions to validate your domain.

Step 3: Download and Install Your SSL Certificate

Once your domain validation is complete, GoDaddy will issue your SSL certificate, typically via email.

The certificate comes in a bundle that includes yourdomain.crt (your primary certificate) and gd_bundle.crt (the intermediate certificate).

Upload these files to the same ~/ssl directory on your EC2 instance:

scp yourdomain.crt ec2-user@your-ec2-ip-address:~/ssl
scp gd_bundle.crt ec2-user@your-ec2-ip-address:~/ssl

Step 4: Configure Your Web Server

The final stage is to configure your web server to use the SSL certificate. The specific steps will vary depending on the web server software you’re using.

Apache

If you’re using Apache, edit your Apache configuration file:

sudo nano /etc/httpd/conf.d/ssl.conf

Locate the SSLCertificateFile and SSLCertificateChainFile lines and update them to point to your certificate and bundle file:

SSLCertificateFile /home/ec2-user/ssl/yourdomain.crt
SSLCertificateChainFile /home/ec2-user/ssl/gd_bundle.crt

Then, restart Apache:

sudo service httpd restart

Nginx

For Nginx, start by editing your Nginx configuration file:

sudo nano /etc/nginx/conf.d/default.conf

Update the ssl_certificate and ssl_certificate_key lines to point to your certificate and private key:

ssl_certificate /home/ec2-user/ssl/yourdomain.crt;
ssl_certificate_key /home/ec2-user/ssl/yourdomain.key;

Don’t forget to save your changes and exit. Then, restart Nginx:

sudo service nginx restart

Conclusion

Congratulations! You’ve now set up a GoDaddy SSL certificate on your Amazon EC2 instance. SSL is a critical aspect of online security, ensuring secure data transmission between your server and your users.

Remember, SSL certificates need to be renewed regularly, so keep an eye on the expiry date of your certificate to avoid any service disruption.

If you’ve followed these steps and are experiencing issues, check your web server’s error logs for any potential clues.

Happy secure serving!


About Saturn Cloud

Saturn Cloud is your all-in-one solution for data science & ML development, deployment, and data pipelines in the cloud. Spin up a notebook with 4TB of RAM, add a GPU, connect to a distributed cluster of workers, and more. Join today and get 150 hours of free compute per month.