So I\'ve looked at every sample configuration I could find and yet every time I try and view a page that requires ssl, I end up in an redirect loop. I\'m running nginx/0.8.5
I found that it was this line
proxy_set_header Host $http_host;
Which should be changed to
proxy_set_header Host $host;
According to the nginx documentation by using '$http_host you're passing the "unchanged request-header".