Please use this template for troubleshooting questions.
My issue:
url not present during startup prevents the start of nginx
How I encountered the problem:
push to url configured, but system is tempory down. Should warn only and (re)start other url and services
Solutions I’ve tried:
--no-block during start
Version of NGINX or NGINX adjacent software (e.g. NGINX Gateway Fabric):
Most recent (just started
Deployment environment:
na
Minimal NGINX config to reproduce your issue (preferably running on https://tech-playground.com/playgrounds/nginx for ease of debugging, and if not as a code block):(Tip → Run nginx -T to print your entire NGINX config to your terminal.)
NGINX access/error log:(Tip → You can usually find the logs in the /var/log/nginx directory.)
Fair warning, I am not an NGINX Guru. This might point you in a direction to solve the problem.
First, it is a common problem. NGINX by default performs DNS resolution at startup. If the hostname (upstream or proxy_pass blocks) can’t be resolved, it will report “host not found in upstream”.
The way I know of to try and resolve this is using a variable in proxy_pass and a resolver in the configuration. Resolver will tell NGINX where to look for DNS records, using the variable, which tells NGINX to resolve on the fly.