stop nginx server code example

Example 1: ubuntn nginx restart

sudo service nginx restart

Example 2: restart nginx

sudo systemctl reload nginx

Example 3: stop nginx server

sudo systemctl stop nginx

Example 4: systemctl reload nginx

systemctl reload nginx

Example 5: stop nginx

sudo systemctl start nginx

Example 6: nginx stop on windows

nginx -s stop	#fast shutdown
nginx -s quit	#graceful shutdown
nginx -s reload	#changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
nginx -s reopen	#re-opening log files