What is the main difference between nginx -s reload and systemctl restart nginx commands?
Think about whether the server process is stopped or kept running during each command.
Reload sends a signal to Nginx to re-read its configuration without stopping the worker processes, so no downtime occurs. Restart fully stops and then starts the Nginx service, causing a brief downtime.
What output will you see if you run nginx -s reload when the configuration file has a syntax error?
nginx -s reload
Consider what happens if Nginx tries to reload a bad config.
If the config has syntax errors, Nginx will report an emergency error and refuse to reload.
What is the correct order of commands to safely apply new Nginx configuration changes without downtime?
Think about editing config first, then testing, then reloading.
First edit the config file, then test it with nginx -t to check syntax, then reload Nginx to apply changes, finally verify the website is working.
After running systemctl restart nginx, the service fails to start. Which of the following is the most likely cause?
Consider what prevents Nginx from starting after restart.
If the config file has syntax errors, Nginx will fail to start on restart because it validates config on startup.
For critical Nginx configuration changes that affect SSL certificates, which approach minimizes risk of downtime?
Think about testing before applying changes and avoiding downtime.
Testing config first ensures no syntax errors. Reload applies changes without stopping Nginx, minimizing downtime risk.