How to reload or restart NGINX

In my experience, there is a difference between restarting nginx using the following:

sudo systemctl restart nginx

And doing the following

service nginx reload

The second option above actaully reloads any configuration changes that have been made to to nginx.

Before reloading changes, its best to run:

nginx -t

So that you can test the configuration first!

Hope this helps 🙌


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *