Welcome! Log In Create A New Profile

Advanced

Re: Nginx reverse proxy regex help

Francis Daly
September 19, 2021 03:16AM
On Sat, Sep 18, 2021 at 10:53:57PM -0400, blason wrote:

Hi there,

> Oh my bad those xxx. and sss consider those are single url. I just typed
> while creating this post randomly

It Will probably be helpful in any future mails if you consistently
replace any information that you want to keep secret.

Perhaps use something like "client-ip" or "client-name"; or "nginx-ip"
or "nginx-name" (or "nginx-name2", if there is more than one); or
"upstream-ip" or "upstream-name".

> Here are my error.log -
>
> 2021/09/17 11:23:09 [error] 9429#9429: *1814357 peer closed connection in
> SSL handshake (104: Connection reset by peer) while SSL handshaking to
> upstream, client: 10.0.22.99, server: xxx.xxxx.xxx.xxx, request: "GET
> /TestPage/ HTTP/1.1", upstream: "https://10.0.20.77:443/TestPage/", host:
> "xx.xxx.xxx.xx"

(Is xxx.xxxx.xxx.xxx the same as xx.xxx.xxx.xx? And if not, do you expect
a request for xx.xxx.xxx.xx to be handled by the nginx server block with
server_name xxx.xxxx.xxx.xxx? If not, then that's the first place to look
for the fix.)

> Wondering why this is making connection to host when my proxy_pass says
> https://<Host_name>

"Host_name" could resolve to anything; and what it resolves to can change
over time. nginx is telling you which specific IP address it was talking
to when this problem happened.

"Connection reset by peer" suggests that the upstream service did not
like some aspect of the request that nginx made to it.

Is 10.0.20.77 the current IP address of xx.ss.xx.ss/Host_name, and is
that different from the IP that that name resolved to when nginx started?

What do you see if you try to talk to that service manually, from the
nginx server?

The output of something like

curl -v https://xx.ss.xx.ss/TestPage

will probably be helpful -- that's not exactly equivalent to what nginx
does, but is usually a good starting point.

(If it shows a different IP address being connected to, then maybe that is
part of the problem.)

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx reverse proxy regex help

blason September 17, 2021 01:34AM

Re: Nginx reverse proxy regex help

Francis Daly September 18, 2021 03:52AM

Re: Nginx reverse proxy regex help

blason September 18, 2021 10:53PM

Re: Nginx reverse proxy regex help

Francis Daly September 19, 2021 03:16AM

Re: Nginx reverse proxy regex help

blason September 19, 2021 08:25AM

Re: Nginx reverse proxy regex help

blason September 19, 2021 08:44AM

Re: Nginx reverse proxy regex help

blason September 19, 2021 10:24AM

Re: Nginx reverse proxy regex help

Francis Daly September 20, 2021 01:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
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