Nginx Verify/Validate Config File and Graceful Reload

December 18, 2018

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.


sudo service nginx restart


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 


sudo systemctl status nginx 
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.