Please try something like that: proxy_redirect http://$proxy_host/ $scheme://$host/; Regards, Biazus Posted at Nginx Forum: http://forum.nginx.org/read.php?2,261275,261283#msg-261283