title: haproxy: inconsistencies between private key and certificate loaded from PEM file
body: <p>I am trying to use certificate signed for another server. I have both private key and certificate.</p>
  
  <p>My PEM file order is :</p>
  
  <pre><code>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-----
  </code></pre>
  
  <p>When i tried to deploy it to my haproxy, i got this error.</p>
  
  <pre><code>[ALERT] 188/141626 (2322) : parsing [/etc/haproxy/haproxy.cfg:32] : 'bind *:443' : inconsistencies between private key and certificate loaded from 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 for bind '*:443' at [/etc/haproxy/haproxy.cfg:32] (use 'crt').
  [ALERT] 188/141626 (2322) : Fatal errors found in configuration.
  Errors in configuration file, check with haproxy check.
  </code></pre>
  
  <p>And my haproxy version is:</p>
  
  <pre><code>HA-Proxy version 1.5.2 2014/07/12
  Copyright 2000-2014 Willy Tarreau &lt;w@1wt.eu&gt;
  </code></pre>
  
  <p>I can start my haproxy with self-signed cert. Why does occur this inconsistency? I am sure that private key belongs to certificate.</p>
  
  <p>I'm trying for hours now but I can not find the reason. </p>
  
  <p>Please help! Thank you!</p>