refactor to templatize nginx.conf