move nginx configuration to template file