Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Last active July 10, 2023 16:24
Show Gist options
  • Select an option

  • Save ipedrazas/6d6c31144636d586dcc3 to your computer and use it in GitHub Desktop.

Select an option

Save ipedrazas/6d6c31144636d586dcc3 to your computer and use it in GitHub Desktop.

Revisions

  1. ipedrazas revised this gist May 27, 2017. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,10 @@ We have to create a certificate with all the intermediate certs.
    # order is important!
    cat dotmarks_net.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > dotmarks.pem

    To avoid the error `peer certificate cannot be authenticated with given ca certificates`, remove the externalCA:

    cat dotmarks_net.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt > dotmarks.pem


    Once we have this pem file, we can configure nginx:

  2. ipedrazas revised this gist May 26, 2014. No changes.
  3. ipedrazas revised this gist May 26, 2014. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -22,10 +22,10 @@ We have to create a certificate with all the intermediate certs.

    Once we have this pem file, we can configure nginx:

    >
    ssl on;
    ssl_certificate /etc/nginx/ssl/dotmarks.net/dotmarks.pem;
    ssl_certificate_key /etc/nginx/ssl/dotmarks.net/dotmarks.net.key;

    ssl on;
    ssl_certificate /etc/nginx/ssl/dotmarks.net/dotmarks.pem;
    ssl_certificate_key /etc/nginx/ssl/dotmarks.net/dotmarks.net.key;


    Then you just have to restart nginx:
  4. ipedrazas revised this gist May 26, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -16,12 +16,13 @@ After validation, you will get a zip file with 4 files:

    We have to create a certificate with all the intermediate certs.

    # order is important!
    # order is important!
    cat dotmarks_net.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > dotmarks.pem


    Once we have this pem file, we can configure nginx:

    >
    ssl on;
    ssl_certificate /etc/nginx/ssl/dotmarks.net/dotmarks.pem;
    ssl_certificate_key /etc/nginx/ssl/dotmarks.net/dotmarks.net.key;
  5. ipedrazas revised this gist May 26, 2014. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -16,13 +16,15 @@ After validation, you will get a zip file with 4 files:

    We have to create a certificate with all the intermediate certs.

    # order is important!
    cat dotmarks_net.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > dotmarks.pem


    Once we have this pem file, we can configure nginx:

    ssl on;
    ssl_certificate /etc/nginx/ssl/dotmarks.net/dotmarks.pem;
    ssl_certificate_key /etc/nginx/ssl/dotmarks.net/dotmarks.net.key;
    ssl_certificate /etc/nginx/ssl/dotmarks.net/dotmarks.pem;
    ssl_certificate_key /etc/nginx/ssl/dotmarks.net/dotmarks.net.key;


    Then you just have to restart nginx:
  6. ipedrazas revised this gist May 26, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -16,11 +16,11 @@ After validation, you will get a zip file with 4 files:

    We have to create a certificate with all the intermediate certs.

    cat dotmarks_net.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > dotmarks.pem
    cat dotmarks_net.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > dotmarks.pem

    Once we have this pem file, we can configure nginx:

    ssl on;
    ssl on;
    ssl_certificate /etc/nginx/ssl/dotmarks.net/dotmarks.pem;
    ssl_certificate_key /etc/nginx/ssl/dotmarks.net/dotmarks.net.key;

  7. ipedrazas revised this gist May 26, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    The process starts by creating the CSR and the private key:

    openssl req -nodes -newkey rsa:2048 -nodes -keyout dotmarks.net.key -out dotmarks.net.csr -subj "/C=GB/ST=London/L=London/O=dotmarks/OU=IT/CN=dotmarks.net"
    openssl req -nodes -newkey rsa:2048 -nodes -keyout dotmarks.net.key -out dotmarks.net.csr -subj "/C=GB/ST=London/L=London/O=dotmarks/OU=IT/CN=dotmarks.net"


    **Generates**
  8. ipedrazas renamed this gist May 26, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  9. ipedrazas created this gist May 26, 2014.
    31 changes: 31 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    The process starts by creating the CSR and the private key:

    openssl req -nodes -newkey rsa:2048 -nodes -keyout dotmarks.net.key -out dotmarks.net.csr -subj "/C=GB/ST=London/L=London/O=dotmarks/OU=IT/CN=dotmarks.net"


    **Generates**
    * dotmarks.net.key
    * dotmarks.net.csr


    After validation, you will get a zip file with 4 files:
    * AddTrustExternalCARoot.crt
    * COMODORSAAddTrustCA.crt
    * COMODORSADomainValidationSecureServerCA.crt
    * dotmarks_net.crt

    We have to create a certificate with all the intermediate certs.

    cat dotmarks_net.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > dotmarks.pem

    Once we have this pem file, we can configure nginx:

    ssl on;
    ssl_certificate /etc/nginx/ssl/dotmarks.net/dotmarks.pem;
    ssl_certificate_key /etc/nginx/ssl/dotmarks.net/dotmarks.net.key;


    Then you just have to restart nginx:

    sudo service nginx reload
    sudo service nginx restart