using nginx as proxy from http to https

mgenov nginx-forum at
Thu Oct 25 14:17:08 UTC 2012


I'm trying to use nginx as a proxy server that should dispatch HTTP requests
to remote HTTPS server. Here are some configuration details which I'm using:

        location /test_server {
                proxy_set_header  X-Real-IP  $remote_addr;

The problem is that when I send request to the nginx server I get 505 error
from remote server. If I execute the request directly to the remote server
it works as expected. Some additional details that I can provide is that the
remote server is using basic authorization and only accepts requests through

I also tried to bind server on port 443 with ssl on and certificates added,
but when I try to use it, I get the following error: 
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify

The configuration steps which I tried are explained in:

Any idea how can I make it work ?

Posted at Nginx Forum:,232212,232212#msg-232212

More information about the nginx mailing list