# Certificate on HTTPS upstream is not verified

**URL:** <https://www.ruby-forum.com/t/certificate-on-https-upstream-is-not-verified/229401>\
**Category:** NGINX\
**Created:** [January 25, 2013, 9:27am UTC](https://www.ruby-forum.com/t/certificate-on-https-upstream-is-not-verified/229401 "2013-01-25T09:27:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![runesoerensen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@runesoerensen](https://www.ruby-forum.com/u/runesoerensen)\
**Post date:** [January 25, 2013, 9:27am UTC](https://www.ruby-forum.com/t/certificate-on-https-upstream-is-not-verified/229401/1 "2013-01-25T09:27:08Z")

</div>

I need to send data to some backend servers using HTTPS, but it seems  
like  
nginx doesn’t verify the certificate on the backend server. For  
instance, if  
I specify `proxy_pass https://example.com` and the certificate on  
[example.com](http://example.com) is invalid, nginx still completes the request without any  
warning.

I’d prefer it if nginx checked whether the certificate could be verified  
during the SSL handshake, and abort the request if the certificate isn’t  
valid.

Is it possible to somehow enable certificate verification of the proxied  
server’s certificate? And if it’s not possible to verify the  
certificate,  
what’s the point in using (or being able to use) an HTTPS backend then?

The reason I need SSL encryption is that traffic from my nginx server  
will  
be passed via public networks to the backend servers.

Thanks,  
Rune

Posted at Nginx Forum:

> **[Certificate on HTTPS upstream is not verified](https://forum.nginx.org/read.php?2,235567,235567#msg-235567)**
>
> I need to send data to some backend servers using HTTPS, but it seems like nginx doesn't verify the certificate on the backend server. For instance, if I specify \`proxy\_pass https://example.com\` and the certificate on example.com is invalid, nginx...

---

<div class="post-metadata">

**Author:** ![runesoerensen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@runesoerensen](https://www.ruby-forum.com/u/runesoerensen)\
**Post date:** [January 25, 2013, 9:47am UTC](https://www.ruby-forum.com/t/certificate-on-https-upstream-is-not-verified/229401/2 "2013-01-25T09:47:35Z")

</div>

It’s possible to do what I want with the mod\_ssl module for Apache. The  
relevant directive is called `SSLProxyVerify`  
[mod\_ssl - Apache HTTP Server Version 2.2](http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#SSLProxyVerify).

Posted at Nginx Forum:

> **[Re: Certificate on HTTPS upstream is not verified](https://forum.nginx.org/read.php?2,235567,235568#msg-235568)**
>
> I need to send data to some backend servers using HTTPS, but it seems like nginx doesn't verify the certificate on the backend server. For instance, if I specify \`proxy\_pass https://example.com\` and the certificate on example.com is invalid, nginx...

---

<div class="post-metadata">

**Author:** ![runesoerensen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@runesoerensen](https://www.ruby-forum.com/u/runesoerensen)\
**Post date:** [January 25, 2013, 10:11am UTC](https://www.ruby-forum.com/t/certificate-on-https-upstream-is-not-verified/229401/3 "2013-01-25T10:11:32Z")

</div>

I just found this ticket which appears to describe (and solve) the same  
issue [#13 (Proxy SSL Verify) – nginx](http://trac.nginx.org/nginx/ticket/13)

Posted at Nginx Forum:

> **[Re: Certificate on HTTPS upstream is not verified](https://forum.nginx.org/read.php?2,235567,235570#msg-235570)**
>
> I need to send data to some backend servers using HTTPS, but it seems like nginx doesn't verify the certificate on the backend server. For instance, if I specify \`proxy\_pass https://example.com\` and the certificate on example.com is invalid, nginx...
