nginx's DNS resolution logic is absurd. If you do this, http://example.com is resolved only once when nginx starts: location / { resolver 127.0.0.1; proxy_pass http://example.com ; } That's bad if http://example.com 's IP address changes. (1/2)
-
Show this thread
-
But if you include a variable in proxy_pass, nginx resolves http://example.com on demand and caches it per the DNS record's TTL: location / { resolver 127.0.0.1; set
$empty ""; proxy_pass http://example.com $empty; } (2/2)3 replies 7 retweets 22 likesShow this thread -
Replying to @__agwa
We would use upstream for that... is not bizarre http://nginx.org/en/docs/http/ngx_http_upstream_module.html …
2 replies 1 retweet 1 like
Replying to @TecnocraticaCPD
upstream adds another absurdity: you need a commercial subscription if you want it to re-resolve domain names!
8:49 AM - 31 Jan 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.