3 ms·
Nginx does have a "dry run" mode for checking configs (unless that something external - like unresponsive servers - is experiencing problems).
by zinekeller 5y ago
Nginx does have a "dry run" mode for checking configs (unless that something external - like unresponsive servers - is experiencing problems).
- KronisLV 5y agoThanks for this information, had to actually look it up and check, seems like that's indeed true: https://www.nginx.com/resources/wiki/start/topics/tutorials/commandline/#options https://www.nginx.com/resources/wiki/start/topics/tutorials/... Here's an example: $ docker run --rm nginx:1.20.2 nginx -t -g "daemon off;" /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh /docker-entrypoint.sh: Configuration complete; ready for start up nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful Every piece of software should definitely have something like that! Ansible is another piece of software that i can recall with an explicit dry mode run like that: https://docs.ansible.com/ansible/latest/user_guide/playbooks_checkmode.html https://docs.ansible.com/ansible/latest/user_guide/playbooks...