Skip to content

Instantly share code, notes, and snippets.

@umidjons
Last active November 6, 2017 20:44
Show Gist options
  • Save umidjons/1cfc2ddebf58b59fe3d4acc2567ebdd0 to your computer and use it in GitHub Desktop.
Save umidjons/1cfc2ddebf58b59fe3d4acc2567ebdd0 to your computer and use it in GitHub Desktop.
Get Free SSL Certificate & Configure Nginx to use it

Get Free SSL Certificate & Configure Nginx to use it

  • Register on GoGetSSL.
  • Choose SSL Certificates -> Domain Validation SSL from top menu.
  • On products table click Details button on row Comodo - Free SSL.
  • On the opening page click Create New Order button.
  • In the Product Configuration section choose: Product Type = SSL Certificates and Select Item = Comodo Trial SSL, then click Complete Order button.
  • On the opening page click Incomplete Orders link.
  • In the List of all your SSL certificates table click Generate button.
  • With Online CSR Generator generate CSR.
  • Copy & Paste generated CSR into Paste your CSR text area.
  • Then click Validate CSR.
  • On the opening page validate your domain via email, dns, http or https.
  • In case of validation via email, you will get your private key as post. Do not lost your private key.
  • After validation you will get access to Download SSL button on the Manage SSL Certificates page, in the certificate details section.
  • Download your certificate & extract it OR check your email, you will get your certificate as archive.
  • Assume your domain is mysite.com, then in the archive you will get mysite_com.ca-bundle and mysite_com.crt files.
  • Open mysite_com.crt file, copy its content, then open mysite_com.ca-bundle file and paste content to the beginning of the file, save the file.
  • Copy files into your domain's folder, for example, into /www/mysite.com/cert/.
  • Save your private key as mysite_com.key and download into www/mysite.com/cert/ folder.
  • Set nginx configurations:
 server {
    listen 80;
    server_name "mysite.com";
    root /www/mysite.com;
    index index.html;
    location / {
        return 301 https://mysite.com;
    }
}
server {
    listen 443 ssl;
    server_name "mysite.com";
    root /www/mysite.com;
    index index.html;
    ssl on;
    ssl_certificate /www/mysite.com/cert/mysite_com.ca-bundle;
    ssl_certificate_key /www/mysite.com/cert/mysite_com.key;
    # ...
}

References

  • You can check SSL of your server with the following tool.
  • You can check your certificate with this decoder tool.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment