diff --git a/cm.sh b/cm.sh
index 4d86836cd8f8c9a0ef9c39da803ec27fed322583..5749837531cf1c41953ad741d8d12405e0b24655 100755
--- a/cm.sh
+++ b/cm.sh
@@ -17,6 +17,7 @@
 # 2021-02-12  <axel.hahn@iml.unibe.ch>  added self test
 # 2021-02-17  <axel.hahn@iml.unibe.ch>  ensure checks list of aliases; new: optional host filter before adding a cert
 # 2021-03-12  <axel.hahn@iml.unibe.ch>  create file for haproxy
+# 2021-03-22  <axel.hahn@iml.unibe.ch>  for haproxy: use chained cert instead of server cert
 # ======================================================================
 
 
@@ -104,7 +105,7 @@ function _certTransfer(){
 	cp ${CM_filekey} ${CM_outfile_key}
 
 	_wd "--- create chained file for haproxy"
-	cat ${CM_outfile_cert} ${CM_outfile_key} > ${CM_outfile_haproxy}
+	cat ${CM_outfile_chain} ${CM_outfile_key} > ${CM_outfile_haproxy}
 
 	_wd "--- content of output dir $CM_dircerts:"
 	ls -l $CM_dircerts/*