Welcome! Log In Create A New Profile

Advanced

Re: Nginx caching proxy dns name even when using variables

Rob Fulton
October 01, 2018 03:16PM
Hi,
On 27/09/2018 15:53, Maxim Dounin wrote:
> Hello!
>
> On Thu, Sep 27, 2018 at 03:27:03PM +0100, Rob Fulton wrote:
>
>> I’ve done some further testing on this today and discovered that
>> the configuration works correctly when the proxy_pass url is
>> accessed via http, I can see dns queries for the proxy_server
>> url every minute as per the ttl. The moment I change the url to
>> https, this stops. Is this a known limitation?
> Most likely, the problem is that you have
>
> proxy_pass https://somehostname.com;
>
> somewhere in the configuration, without variables - so nginx
> resolves the name during configuration parsing. As a result, your
> construct
>
> set $proxy_server somehostname.com;
> proxy_pass https://$proxy_server;
>
> does not try to resolve the name, but rather ends up using the
> existing upstream for somehostname.com.

Thank you very much for your help, you were correct I had a proxy_pass
directive for a 404 error page to the same hostname configured without a
variable, setting this correctly resulted in the correct behavior.

Regards

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

Nginx caching proxy dns name even when using variables

Rob Fulton September 26, 2018 11:56AM

Re: Nginx caching proxy dns name even when using variables

Rob Fulton September 27, 2018 10:30AM

Re: Nginx caching proxy dns name even when using variables

Maxim Dounin September 27, 2018 10:54AM

Re: Nginx caching proxy dns name even when using variables

Rob Fulton October 01, 2018 03:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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