Fix problem with nginx hostname replace