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.

Revisions

  1. umidjons revised this gist Oct 18, 2016. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion ssl-nginx.md
    Original file line number Diff line number Diff line change
    @@ -40,4 +40,9 @@ server {
    ssl_certificate_key /www/mysite.com/cert/mysite_com.key;
    # ...
    }
    ```
    ```

    ## References

    - You can check SSL of your server with the following [tool](https://www.ssllabs.com/ssltest/index.html).
    - You can check your certificate with this decoder [tool](https://www.sslshopper.com/certificate-decoder.html).
  2. umidjons revised this gist Oct 18, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ssl-nginx.md
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@
    - 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.
    - 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/`.
  3. umidjons created this gist Oct 5, 2016.
    43 changes: 43 additions & 0 deletions ssl-nginx.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    # Get Free SSL Certificate & Configure Nginx to use it

    - Register on [GoGetSSL](https://www.gogetssl.com).
    - 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](https://my.gogetssl.com/en/user/csr/generate/) 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.
    - 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:

    ```nginx
    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;
    # ...
    }
    ```