Verify/validate nginx config file.
sudo nginx -t
Graceful reload.
sudo nginx -s reload
NOTE: Reload will check validity of config file before actually reload.
Restart.
sudo service nginx restart
or
sudo systemctl restart nginx
NOTE: Make sure you validate nginx config file (sudo nginx -t
) before doing a restart. If you don't and there is a problem with the config file, nginx shall remain down until the problem is fixed.
Check nginx status.
sudo service nginx status
or
sudo systemctl status nginx