If you need to automate a NGINX block template, you can use this script.
add-tcpudcp.sh
-> Generate TCP/UDP Nginx block.del-tcpudp.sh
-> Delete TCP/UDP Nginx block.add-dnsNginx.sh
-> Add HTTPS Nginx block.del-dnsNginx.sh
-> Delete HTTPS Nginx block.
This script just Nginx block reverse proxy template, if you need an unique template of Nginx, you must customize that script.