upstream ${name} {
%{ if resolver != "" ~}
    resolver ${resolver};
%{ endif ~}
    server ${upstream}:${upstream_port}; 
}
server {
    listen %{ if protocol == "UDP" ~}${port} udp;%{ else ~}${port};%{ endif }
%{ if custom_snippet != "" ~}
${custom_snippet}
%{ endif ~}
    proxy_pass ${name};
}
