Confirm the active config path
Confirm the Nginx binary, main config path, and startup options. If the service uses custom -c or -p options, use them for both testing and reloading; do not create another config because the default path differs.
Test the configuration first
- Record the config path, change, and rollback plan.
- Run with the service’s expected permissions:
- nginx -t
- For a custom file, add the actual option, such as -c /actual/path/nginx.conf; do not copy the example path blindly.
- Check status and errors; -t checks syntax and tries referenced files.
Reload only after a successful test and approval
If the test fails, do not reload; fix the reported issue and test again. After success and approval, run nginx -s reload with the active config path and suitable permissions. Nginx’s master tries the new config and rolls back if it cannot apply it. Then check process state, logs, and a controlled request; syntax success does not prove the upstream app is healthy.
Scope
Reload only an Nginx instance you are authorized to administer. For a client VPN issue, record client, network, and timing and contact the operator rather than changing a server remotely.