# Nginx as the proxy that provides client certificate and faced connection attempt failed talk to upst

**URL:** <https://www.ruby-forum.com/t/nginx-as-the-proxy-that-provides-client-certificate-and-faced-connection-attempt-failed-talk-to-upst/244920>\
**Category:** NGINX\
**Created:** [July 7, 2016, 10:09pm UTC](https://www.ruby-forum.com/t/nginx-as-the-proxy-that-provides-client-certificate-and-faced-connection-attempt-failed-talk-to-upst/244920 "2016-07-07T22:09:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [July 7, 2016, 10:09pm UTC](https://www.ruby-forum.com/t/nginx-as-the-proxy-that-provides-client-certificate-and-faced-connection-attempt-failed-talk-to-upst/244920/1 "2016-07-07T22:09:22Z")

</div>

Hey,

I’m using nginx for windows as a reverse proxy to upstream server. The  
upstream server requires client certificate and thus in the nginx  
config, I put the following:

location / {  
proxy\_ssl\_certificate\_key cert.key;  
proxy\_ssl\_certificate cert.crt;  
proxy\_pass [https://upstream](https://upstream);  
}

and the key and cert are pem format.

However, when I send request to the nginx proxy, it returns 504  
gateway timeout and the error log is

10060: A connection attempt failed because the connected party did not  
properly respond after a period of time, or established connection  
failed because connected host has failed to respond) while reading  
response header from upstream

And I confirmed by curl with the cert files above directly to the  
upstream and it worked.

Can someone please help understand what could be wrong here?

Thanks,  
Jason
