How to enable SSL certificate on Nginx

First of all you have to check if your webserver version supports ssl. If ssl is not enabled in your server read more here

If SSL module is installed in your nginx instance then you have more few simple steps to follow.

  1. Generate Certificate Signing Request (CSR)
    • Generate private key
    • Generate the CSR
  2. Create a backup of private key in a secure place it will be useful
  3. Request Certificate – with the CSR generated above you can go to a provider to sign your certificate.
  4. Install the certificate
    • You have to receive to keys from your SSL certificate provider: your primary certificate and the intermediate certificate.
    • create one file with both files
    • Upload to the server in a safe place with read access for root user
    • Edit your host configuration on nginx
    • Test your nginx configuration and restart the service if everything is fine.
  5. Done