Update nginx rewrite recipe to work correctly on a cluster