Complete the code to define an upstream block using the default round-robin method.
upstream backend {
server [1];
}The server directive inside the upstream block defines backend servers. The default load balancing method is round-robin, so just listing servers is enough.
Complete the code to proxy requests to the upstream group named 'backend'.
location / {
proxy_pass http://[1];
}The proxy_pass directive should point to the upstream group name to use round-robin load balancing.
Fix the error in the upstream block by completing the missing server address.
upstream backend {
server [1];
server 192.168.1.11:80;
}Each server directive must have a valid IP address and port. Here, the first server address was missing.
Fill both blanks to create an upstream block with two servers using default round-robin.
upstream backend {
server [1];
server [2];
}Both blanks must be valid server addresses. Parameters like 'weight=5' or 'ip_hash' are not server addresses.
Fill all three blanks to create a proxy_pass directive inside location that uses the 'backend' upstream group.
location /app/ {
proxy_pass http://[1]/[2];
proxy_set_header Host [3];
}The proxy_pass should point to the upstream group 'backend' and the correct URI path. The proxy_set_header Host should pass the original host header using $host.