refactor nginx.tmpl