I was able to resolve the issue using following rewrite rule. rewrite ^(.*)$ https://$servername.mydomain.com$1; Posted at Nginx Forum: http://forum.nginx.org/read.php?2,261751,261810#msg-261810