September 21, 2021 09:06AM
El 2021-09-21 09:23, Francis Daly escribió:
> On Mon, Sep 20, 2021 at 05:20:55PM -0300, Daniel Armando Rodriguez
> wrote:
>> El 2021-09-20 13:49, Francis Daly escribió:
>> > On Sun, Sep 19, 2021 at 10:08:08PM -0300, Daniel Armando Rodriguez
>> > wrote:
>
> Hi there,
>
>> > > curl -i https://4.DOMAIN.edu.ar
>> > >
>> > > Returns a redirect to https://4.DOMAIN.edu.ar
>> >
>> > And that is a redirect loop, which is not what you want.
>> >
>> > When you request https://4.DOMAIN.edu.ar, that should get to nginx,
>> > which should make a http request to INTERNAL_IP and return the response.
>
>> > What response do you get if you start on the nginx server and run the
>> > command
>> >
>> > curl -v -H Host:4.DOMAIN.edu.ar http://INTERNAL-IP/
>
>
>> This is the output
>>
>> # curl -v -H Host:4.DOMAIN.edu.ar http://INTERNAL-IP/
>
> <snip>
>
>> > GET / HTTP/1.1
>> > Host:4.DOMAIN.edu.ar
>
>> < HTTP/1.1 301 Moved Permanently
>> < Location: https://1.DOMAIN.edu.ar/
>
> This indicates that the internal web server is returning a redirect to
> https://1, when you ask it for http://4.
>
> Is there any chance that that internal web server is not yet configured
> to
> believe that it is 4, and it instead redirects to its default name of
> 1?
>
>> However, the same target machine hosts other services (each one with
>> its own
>> subdomain: 1, 2 & 3) that also go through the proxy. And they work as
>> expected. Just to compare, this is the output.
>>
>> # curl -v -H Host:2.DOMAIN.edu.ar http://INTERNAL-IP/
>
>> > GET / HTTP/1.1
>> > Host:2.DOMAIN.edu.ar
>
>> < HTTP/1.1 200 OK
>
> (And, presumably, the correct content from 2.)
>
>
> That might also explain why the first test failed, then started working
> -- perhaps the internal web server reloaded its configuration and it
> started behaving as expected?
>
> (And maybe it works for 4 now too, if the config reloaded over night?)
>
> Cheers,
>
> f


Well, reloaded conf in internal server but issue is still there. Seems
there's some odd behaviuor from Apache in that host. So, my quest will
go that way.

Thanks for taking the time to read.

Regards
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Reverse proxy redirection issue

drodriguez September 17, 2021 09:26PM

Re: Reverse proxy redirection issue

Francis Daly September 18, 2021 04:04AM

Re: Reverse proxy redirection issue

drodriguez September 18, 2021 08:18AM

Re: Reverse proxy redirection issue

Francis Daly September 19, 2021 03:02AM

Re: Reverse proxy redirection issue

drodriguez September 19, 2021 09:10PM

Re: Reverse proxy redirection issue

drodriguez September 20, 2021 10:04AM

Re: Reverse proxy redirection issue

Francis Daly September 20, 2021 12:50PM

Re: Reverse proxy redirection issue

drodriguez September 20, 2021 04:22PM

Re: Reverse proxy redirection issue

Francis Daly September 21, 2021 08:24AM

Re: Reverse proxy redirection issue

drodriguez September 21, 2021 09:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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