refactor nginx host templates