Welcome! Log In Create A New Profile

Advanced

Problem with Upstream over SSL

December 05, 2013 09:44AM
I was proxying to an IIS server on 443 on nginx 1.1 on FreeBSD and it worked perfectly fine. We moved to nginx 1.4 running on ubuntu and now it won't work.

The following works perfect:

server {
location / {
proxy_pass http://server.domain.com
}
}

But when I change it to

server {
location / {
proxy_pass https://server.domain.com
}
}

It times out. I can curl both http:// and https:// no problem. The strange thing is the log message with the timeout error is showing the IP instead of the hostname.

2013/12/05 09:30:33 [error] 20109#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.200, server: external.domain.com, request: "GET / HTTP/1.1", upstream: "https://192.168.1.10:443/", host: "external.domain.com"

What I'm guessing is nginx is trying to proxy to the host via the IP and then timing out because of SSL issues, as the SSL cert is not valid for the IP, only for the domain name.

Why is nginx proxying to the IP instead of the hostname? Can I force it to use the hostname?
Subject Author Posted

Problem with Upstream over SSL

cschiewek December 05, 2013 09:44AM

Re: Problem with Upstream over SSL

Maxim Dounin December 05, 2013 10:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready