nginx.tmpl refactoring