Nginx Verify/Validate Config File and Graceful Reload

Dec 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.

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 

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.