The following command will concatenate the intermediate certificate bundle with the root certificate.
Afterwards you may need to manually fix the start and end of the certificates.
cat mywebsite.crt mywebsite-intermediates.ca-bundle.crt >> mywebsite-certchain.crt
https://www.samkear.com/security/install-comodo-positive-ssl-certificate-nginx