libreddit-loadbalance-demo/templates/nginx-libreddit.tftpl

22 lines
368 B
Text

upstream libreddit {
%{ for vm in libreddit_vms ~}
server ${vm.ip}:8080; #${vm.name}
%{ endfor ~}
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
location / {
proxy_read_timeout 300s;
proxy_pass http://libreddit; #pass all requests processed to the libreddit upstream servers
proxy_http_version 1.1;
}
}