# /etc/nginx/sites-available/backendTo update backend1.example.com, mark it as down,
upstream backend {
server backend1.example.com:8080;
server backend2.example.com:8080;
}
# /etc/nginx/sites-available/backend
upstream backend {
server backend1.example.com:8080 down;
server backend2.example.com:8080;
}
> service nginx reload
Now update your code and reload the server configs.
> service nginx reload
Similarly, for the second server
upstream backend {
server backend1.example.com:8080;
server backend2.example.com:8080 down;
}
> service nginx reload
Update code on second server
> service nginx reload
The reload command does not restart the Nginx server.
No comments:
Post a Comment