Reloading NGINX Without Downtime


Sometimes, you need to apply a new configuration without causing downtime by restarting the NGINX.

Check if the configuration is valid

Before reloading or restarting NGINX, make sure that your configuration is valid.

nginx -t

This command check the syntax and validity of your configuration files.

Reloading the NGINX

To apply the new configuration without downtime, use the commands below.

service nginx reload

or

nginx -s reload

If these commands don’t work, ensure you have the necessary permissions (sudo).

Leave a Reply

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