Nginx configuration leads to endless redirect loop

前端 未结 9 1397
独厮守ぢ
独厮守ぢ 2020-12-01 04:18

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

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 05:15

    In case someone else stumbles on this, I was attempting to configure both http and https via the same server {} block, but only added the "listen 443" directive believing that the "this line is default and implied" meant that it would also listen on 80 as well, it didn't. Uncommenting the "listen 80" line so that both listen lines were present corrected the infinite loop. No idea why it would have even been getting a redirect at all, but it did.

提交回复
热议问题