Forum: NGINX using nginx as proxy from http to https

2974d09ac2541e892966b762aad84943?d=identicon&s=25 mgenov (Guest)
on 2012-10-25 16:17
(Received via mailing list)
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
36a8284995fa0fb82e6aa2bede32adac?d=identicon&s=25 Francis Daly (Guest)
on 2012-10-25 18:07
(Received via mailing list)
On Thu, Oct 25, 2012 at 10:17:08AM -0400, mgenov wrote:

Hi there,

>         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.

HTTP 505 means HTTP Version Not Supported.

What version do you use when you execute the request directly?

What version does nginx use?

Do you see a different response from

curl -i -k https://testserver.testdomainserver.com:9090/

and

curl -i -k -0 https://testserver.testdomainserver.com:9090/

?

Good luck,

  f
--
Francis Daly        francis@daoine.org
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mgenov (Guest)
on 2012-10-25 18:20
(Received via mailing list)
Actually it returns error 500. Here is the log information from
access.log

[25/Oct/2012:18:44:10 +0300] "POST /testurl/testservice HTTP/1.1" 500 75
"-"
"-"

Here is my version.

nginx -v
nginx version: nginx/0.7.67

In a few minutes I'll try with curl and will post the result.


> and
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,232212,232224#msg-232224
B72bff74dc272c099eef49bae550fffb?d=identicon&s=25 Andre Jaenisch (Guest)
on 2012-10-25 21:04
(Received via mailing list)
2012/10/25 mgenov <nginx-forum@nginx.us>:
> Here is my version.
>
> nginx -v
> nginx version: nginx/0.7.67

Your version looks outdated ...
> 2012-09-25 nginx-1.2.4 stable version has been released. (See:
http://nginx.org/)

Don't sure, wether this is the problem ...
Well, this is the oldest announcement I've found:
> 2009-12-15 nginx-0.8.30 development version has been released. (See:
http://nginx.org/2009.html)

So your versions seems to be REALLY old!

Regards, Andre
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mgenov (Guest)
on 2012-10-29 15:58
(Received via mailing list)
I've update my version to: nginx: nginx version: nginx/1.0.5 and it
seems
that the result is similar. Any other ideas ?

Andre Jaenisch Wrote:
-------------------------------------------------------
> Don't sure, wether this is the problem ...
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,232212,232326#msg-232326
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.