Rewrite nginx configuration