ssl - haproxy: inconsistencies between private key and certificate loaded from PEM file -


i trying use certificate signed server. have both private key , certificate.

my pem file order :

subject=/c=***/l=*****/o=**********/cn=********* issuer=/c=***/o=*****inc/cn=********secure server ca -----begin certificate----- -----end certificate----- subject=/c=us/o=******** inc/cn=********* sha2 secure server ca issuer=/c=us/o=********* inc/ou=*********/cn=******** global root ca -----begin certificate----- -----end certificate----- subject=/c=us/o=********* inc/ou=***********/cn=*********** global root ca issuer=/c=us/o=********* inc/ou=************/cn=******** global root ca -----begin certificate----- -----end certificate----- -----begin rsa private key----- -----end rsa private key----- 

when tried deploy haproxy, got error.

[alert] 188/141626 (2322) : parsing [/etc/haproxy/haproxy.cfg:32] : 'bind *:443' : inconsistencies between private key , certificate loaded pem file ................ [alert] 188/141626 (2322) : error(s) found in configuration file : /etc/haproxy/haproxy.cfg [alert] 188/141626 (2322) : proxy 'www-https': no ssl certificate specified bind '*:443' @ [/etc/haproxy/haproxy.cfg:32] (use 'crt'). [alert] 188/141626 (2322) : fatal errors found in configuration. errors in configuration file, check haproxy check. 

and haproxy version is:

ha-proxy version 1.5.2 2014/07/12 copyright 2000-2014 willy tarreau <w@1wt.eu> 

i can start haproxy self-signed cert. why occur inconsistency? sure private key belongs certificate.

i'm trying hours can not find reason.

please help! thank you!

the order of certificates in file wrong. seems putting intermediate certificate (i.e. secure server ca) first expected server certificate. order of certificates needs be:

  • server certificate
  • server private key (without password)
  • intermediate certificate 1
  • intermediate certificate 2

it's not important put private key. however, order of certificates strictly needs ordered leaf root, i.e. first server certificate, intermediate, it's parent. basically, put server certificate first, signer, signer, ...

for more information, please refer the documentation.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -