Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
$ cd /etc/ssl/nginx
Log in to NGINX Plus Customer Portal and download your nginx-repo.crt and nginx-repo.key files.
Download the NGINX signing key from nginx.org and add it:
Servers in the group are configured using the server directive. Let's see an example, the
following configuration defines a group named backend and consists of three server
configurations that may resolve in more than three actual servers.
http {
upstream backend {
server backend1.example.com ;
server backend2.example.com;
server 192.0.0.1 backup;
}
}
To pass the requests to a server group, the group name is specified in the proxy_pass directive. In the
below example, a virtual server running on Nginx passes all requests to the upstream backend group.
server {
location / {
proxy_pass http://backend;
}
}
The following example combines the two snippets above and shows how to proxy HTTP request
to the backend server group. The group consists of three servers, two of the instances of the
same application while the third is a backup server. Because there is no load-balancing
algorithm is specified in the upstream block, Nginx uses the default algorithm, Round Robin.
http {
upstream backend {
server backend1.example.com;
server backend2.example.com;
server 192.0.0.1 backup;
}
server {
location / {
proxy_pass http://backend;
}
}
}
Now NGINX Plus is ready to load balance the traffic. Please test and let me know if you stuck at
any point.