Test the nginx configuration and reload only on success
nginx reload config | reload nginx without downtime | apply nginx config changes | safely restart nginx | nginx | systemctl | reloadCaution: This command changes the system. Understand what it does before you run it.
nginx -t && systemctl reload nginxChecks the configuration and reloads it with reload without dropping existing connections. The old workers finish their running requests while new workers take over with the new configuration. If the test fails, nothing happens and the service keeps running with the old configuration.
Note: On Plesk, manual changes to generated files are overwritten during the next reconfiguration. Custom directives belong in the domain’s additional nginx directives.
Also searched as
- nginx reload config
- reload nginx without downtime
- apply nginx config changes
- safely restart nginx