Configure complex upstreams with Hash members
masterUpstream members must be defined as a Hash where the key is the address and the value is a Hash of configuration options (like server, port, and weight). Note that the previous Array-based syntax is no longer supported.
nginx::resource::upstream { 'openvox_rack_app':
members => {
'localhost:3000' => {
server => 'localhost',
port => 3000,
weight => 1,
},
'localhost:3001' => {
server => 'localhost',
port => 3001,
weight => 1,
},
'localhost:3002' => {
server => 'localhost',
port => 3002,
weight => 2,
},
},
}
nginx::resource::server { 'rack.voxpupuli.org':
proxy => 'http://openvox_rack_app',
}