Nginx can't redriect to the right web folder, always lose or 521

This domain bought in Cloudflare, but can’t be redriected to the right web folder, always lose or 521. If use Apache, it works.
if use other domain, Ngnix could work as normal, no problem.
Is there something wrong with this Cloudflare domain.and Ngnix? Why Apache can identify and redriect to the right web folder?


A 521 means that Cloudflare is not able to establish a connection with your origin web server, and seeing a connection refused when establishing a TCP connection, over the port you are connecting either 80/443 - depending on your SSL mode - Encryption modes · Cloudflare SSL/TLS docs

Flexible we connect over port 80, Full/Full Strict connects over port 443.

Ensuring that your origin and any security devices in front of your server allow our Cloudflare IP’s to connect to these ports, should prevent you from experiencing a 521 - IP Ranges

Hope this helps!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.