Web / NGINX Interview questions
How do you start, stop, and reload NGINX?
sudo systemctl start nginx sudo systemctl stop nginx sudo systemctl restart nginx sudo systemctl reload nginx
restart stops and starts the whole process, briefly dropping connections. reload is the preferred option after a configuration change - it signals the master process to spawn new workers with the updated config while old workers finish in-flight requests, so there's no downtime.
You can also call the binary directly with nginx -s reload or nginx -s stop, which sends the same signals without going through systemd.
More Related questions...