Tips to Install GoDaddy SSL Certificate Nginx

Tips to help Install GoDaddy SSL Certificate Nginx

It is not really hard to install GoDaddy SSL Certificate Nginx. The process may look intimidating but since there are step by step guides that you can follow, you can confidently install your certificate on Nginx. Just make sure that you have backed up your files before you begin the installation. This way, you won’t lose any data when there are issues with the installation.

Even though data loss is quite rare as problems do not really occur in installing GoDaddy SSL Certificates on Nginx, it is better to be on the safe side.

Godaddy is a great option for reliable, cheap SSL certs.  Get the best price.

Installing a GoDaddy SSL Certificate on Nginx

Here is a short guideline on how you can install a certificate on Nginx. Follow it step by step to prevent errors on the installation process.

The first thing that you need to do to buy the certificate that you need is to generate a Certificate Signing Request. You will submit this to GoDaddy so that you will be issued with the certificate that you need.

Just provide all the information needed for your certificate such as your website’s domain and location. After downloading the CSR file, copy the contents and paste it on GoDaddy’s certificate request page.

You should be able to download your SSL Certificate within a few hours, given that you are requesting for a Domain Validation certificate. If you have requested for an Extended Validation certificate, you might have to wait for a few weeks since the requirements are stricter and the validation is stringent.

  • Concatenate the cert file and the intimidate cert file and save it as a single .pem file by running the code:

cat your_domain.crt your_domain.ca-bundle >> your_domain_cert_chain.crt

Your cert bundle will be saved as ‘your_domain_cert_chain.crt’. Save it on a safe place so that you can upload it later when you are installing the certificate on Nginx.

  • Install your SSL Certificate thru Nginx.

To install your GoDaddy SSL Certificate, upload the files to /etc/ssl/ by running the code:

sudo cp yourdomain_cert_chain.crt /etc/ssl/

sudo cp yourdomain.key /etc/ssl/

Now, run the command below to edit your virtual host. This will ensure that Nginx will use your certificate.

upstream your_domain_server {

server unix:/opt/your_domain/run/gunicorn.sock fail_timeout=0;

}

 

# Redirect all non-encrypted to encrypted

server {

server_name your.domain;

listen 80;

return 301 https://your.domain$request_uri;

}

 

server {

server_name your.domain;

 

listen 443; # <-

 

ssl on; # <-

ssl_certificate /etc/ssl/yourdomain_cert_chain.crt; # <-

ssl_certificate_key /etc/ssl/yourdomain.key; # <-

 

client_max_body_size 4G;

 

access_log /opt/your_domain /logs/nginx-access.log;

error_log /opt/your_domain/logs/nginx-error.log;

 

location / {

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto https; # <-

proxy_set_header Host $http_host;

proxy_redirect off;

 

if (!-f $request_filename) {

proxy_pass http://your_domain_server;

break;

}

}

}

All you have to do now is to restart Nginx to make everything working as intended:

sudo service nginx restart

Once that is done, you can check your website to see if everything is working fine and your GoDaddy SSL Certificate is being used by your website.

Don’t forget to edit the your_domain lines above with your cert file name or domain name. This will ensure that your website will be able to use your certificate as the latter is intended for it.

Leave a Comment

Previous post:

Next post: