Nginx 502 With Js Window Location Href