using nginx as proxy from http to https

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


Hello, 

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_pass     
https://testserver.testdomainserver.com:9090/;
                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
HTTPS. 

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
failed

The configuration steps which I tried are explained in:
http://wiki.nginx.org/HttpSslModule

Any idea how can I make it work ?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,232212,232212#msg-232212



More information about the nginx mailing list