building nginx configs correctly