I am wondering when I am routed my traffic through Cloudflare system its showing port 80 is closed.
Can you rephrase your question?
I have create a new EC2 instance at AWS. It’s supposed to be a wordpress server & nginx is up & running. My domain is registered under Godaddy & after installing nginx the defult nagix welcome page is coming but the problem arise when I am change my nameserver to Cloudflare, now its showing Error 502 Bad gateway. I am very new so I think I may do some silly mistake. Can you please help on this matter.
Tnx for sharing but if my server (AWS EC2) not configured properly then how its working when Godaddy nameserver is in use, that’s why im not able to understand as previously I assume like I do something wrong with the EC2 security group but I double check this.
EC2 has their own firewall (security groups) in front of their server instances https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html.
Did you make sure to whitelist http (port 80) and https (port 443) at EC2 Firewall level ? And also ensure your EC2 server is properly recording real visitor’s IP addresses https://support.cloudflare.com/hc/en-us/sections/200805497-Restoring-Visitor-IPs ?
You may also need to whitelist Cloudflare IPs https://www.cloudflare.com/ips/ at EC2 firewall level
my website url : http://urbnwp.com/
AWS security group setting inbound setting
So url domain works with Cloudflare disabled on non-https version of domain ?
curl check your url gives
HTTP/1.1 521 Origin Down see troubleshooting steps at https://support.cloudflare.com/hc/en-us/articles/200171916-Error-521-Web-server-is-down.
have you verified that nginx sees real visitor ips and not Cloudflare’s ip ? check nginx logs for more clues as well
Tnx problem solve my nginx is not recording real visitor IP.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.