Difference Between reload and restart in Nginx
Difference Between reload and restart in Nginx
reload (Recommended for Config Changes)
1
sudo systemctl reload nginx
Reloads Nginx without stopping it.
- Applies configuration changes without dropping active connections.
- Gracefully restarts worker processes while keeping the master process running.
- Preferred when you make configuration updates.
restart (For Full Restart)
1
sudo systemctl restart nginx
- Stops and then starts Nginx completely.
- Drops all active connections.
- Use when Nginx is unresponsive or if a full reset is needed.
When to Use Which?
Use reload when updating the Nginx configuration.
Use restart if Nginx is not working properly or needs a complete reset.
This post is licensed under CC BY-NC 4.0 by the author.