# Nginx SSL problem for ca-bundle

**URL:** <https://www.ruby-forum.com/t/nginx-ssl-problem-for-ca-bundle/190214>\
**Category:** NGINX\
**Created:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/nginx-ssl-problem-for-ca-bundle/190214 "2010-06-17T16:22:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@karthik](https://www.ruby-forum.com/u/karthik)\
**Post date:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/nginx-ssl-problem-for-ca-bundle/190214/1 "2010-06-17T16:22:22Z")

</div>

Hi nginx team,

we running nginx + ssl certificate

i configure domain.ca-bundle in nginx

cat domain.ca-bunde \>\> domainname.crt

and configure

```
ssl_certificate /opt/ssl/domain_com.crt;
ssl_certificate_key /opt/ssl.key/domain_com.key;

```

when i restart nginx server following below error displayed.

SSL\_CTX\_use\_PrivateKey\_file("…/domain com.key") failed (SSL:  
error:0B080074:x509 certificate routines:X509\_check\_private\_key:key  
values  
mismatch)

how to resolve this issue…

Thanks and Regards,  
R.Karthik

---

<div class="post-metadata">

**Author:** ![karthik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@karthik](https://www.ruby-forum.com/u/karthik)\
**Post date:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/nginx-ssl-problem-for-ca-bundle/190214/2 "2010-06-17T16:22:37Z")

</div>

It’s likely not in the right order. If I remember correctly, it is cert  
–\> intermediary --\> bundle

Also verify there are no white spaces, etc. If you are running Windows  
as a desktop, you can copy and paste them out if you’re VERY careful not  
to pick up white space or additional lines.

Open it with wordpad, not notepad and copy it out. Otherwise, use an  
editor and copy / paste it out (like vi).

Don’t use ‘more’. cat should work as you mentioned but if it’s not in  
the correct order, then that could be it. My guess is the key/cert  
aren’t matching correctly.

---

<div class="post-metadata">

**Author:** ![karthik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@karthik](https://www.ruby-forum.com/u/karthik)\
**Post date:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/nginx-ssl-problem-for-ca-bundle/190214/3 "2010-06-17T16:22:47Z")

</div>

On Wed, Jun 16, 2010 at 09:19:30AM +0530, karthi r wrote:

> how to resolve this issue..  
> [Configuring HTTPS servers](http://nginx.org/en/docs/http/configuring_https_servers.html#chains)

$ cat www.nginx.com.crt bundle.crt \> www.nginx.com.chained.crt

…

If the server certificate and the bundle have been concatenated in the  
wrong order, nginx will fail to start and will display the error  
message:

SSL\_CTX\_use\_PrivateKey\_file(" … /www.nginx.com.key") failed  
(SSL: error:0B080074:x509 certificate routines:  
X509\_check\_private\_key:key values mismatch)

because nginx has tried to use the private key with the bundleâ€™s first  
certificate instead of the server certificate.

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**
