Comodo bundle SSL certificate

How do we mix the Comodo certificate to be used with Apache, HAproxy, Pound or any other webserver or load balancer?

I’m buying my certificates from CheapSSLsecurity. So we have the following files:

  1. your_certfile.crt - this is your certificate
  2. SectigoRSADomainValidationSecureServerCA.crt - this is Intermediate CA Certificate
  3. USERTrustRSAAddTrustCA.crt - this is USERTrust RSA Certification Authority
  4. AddTrustExternalCARoot.crt - this is Root CA Certificate
  5. private_key.key - this is your private key

In order for this to work, there is an order on how to build the certificate file, and we can seen bellow the order on how to concatenate files:

  1. private_key.key
  2. your_certificate.crt
  3. SectigoRSADomainValidationSecureServerCA.crt
  4. USERTrustRSAAddTrustCA.crt
  5. AddTrustExternalCARoot.crt
cat private_key.key your_certificate.crt SectigoRSADomainValidationSecureServerCA.crt USERTrustRSAAddTrustCA.crt AddTrustExternalCARoot.crt >> bundle.pem