Hi everyone, please help me figure what i am doing wrong.
$URL = https://example.com because of new user limit
A domain is transferred to Cloudflare, and the A record points to its IP address. The site is working as it should.
Now, enabling proxying in Cloudflare i get never ending 302 redirect loop:
Request URL: $URL
Request Method: GET
Status Code: 302 Moved Temporarily
Remote Address: 104.27.188.13:80
Referrer Policy: no-referrer-when-downgrade
CF-Cache-Status: DYNAMIC
CF-RAY: 59c96c857a93048b-CDG
cf-request-id: 0311c2276e0000048b5b09e200000001
Connection: keep-alive
Content-Type: text/html
Date: Mon, 01 Jun 2020 13:53:58 GMT
Location: $URL
Server: Cloudflare
Transfer-Encoding: chunked
As you can see, there is a forever 302 redirect from $URL to $URL. I have no page rules doing HTTPS rewrites or redirects, and Always use HTTPS is disabled, as i want my server to do the redirects from www to non-www and from http to https.
Here’s the nginx config on the origin server: pastebin