4 ms·
'nginx -t' exists as a general syntax checker, would be neat to expand it further to include these in depth checks.
by k1kingy 2y ago
'nginx -t' exists as a general syntax checker, would be neat to expand it further to include these in depth checks.
- progbits 2y agoWhat's annoying about the built-in checker is that it attempts to connect proxypass backends. So if you want to run this in CI you will get connection refused errors.
- zelphirkalt 2y agoOn the other hand, if it never checked those, you would run into problems, when you rely on those being available and somehow they are not.
- ndsipa_pomu 2y agoPut the proxy settings into variables and you can sidestep that. It also allows NgINX to start up when the backends may not be running. e.g. set $upstream_app backend; set $upstream_port 8888; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port;