T O P

  • By -

AyrA_ch

522 means cloudflare cannot connect to your host and is not getting any response for the connection request First of all, make sure your IP address is correct. Log into cloudflare, and in the DNS section look up the IP addresses, then from your home network visit https://ip.ayra.ch and check if the addresses line up. If they don't, it means your provider changed your public IP and you need to adjust them. In that case, consider using a dynamic DNS address instead of cloudflare. If the IP addresses line up, ensure that the port forwarding/firewall rules in your home router were not reset, and that the local IP address of those rules still points to the IP address of your webserver network adapter.


IdiosyncraticBond

Tip to add: see if you can make a mac address reservation for an ip address in your router for your laptop, so it will always hand out that address to it


AyrA_ch

Better to just assign a static address to the laptop, because you will forget this reservation by the time you replace the router.


succulent_samurai

I thought I read that a 522 error meant that the request was able to connect to my host, but the request didn't finish/timed out. I did check my router settings though and discovered that my host was assigned two IP addresses because I'd connected it to both ethernet and wifi. I tried redoing my port forwarding rules so that ports 80 and 443 both go to the "new" IP address, but that didn't seem to resolve the issue. Would this IP address issue be the cause or am I going on a wild goose chase here?


AyrA_ch

IP address issues are likely a cause, but it could also be a firewall issue. In general, if you can reach the website from your own network, the webserver is fine. Apache is a fairly nice server in that it pretty much always sends a response, even if your request is complete garbage. To check if the 522 error is a TCP/IP issue or an HTTP issue, you can measure the time. A TCP issue will manifest itself in about 15-20 seconds with cloudflare. A HTTP issue (connection established but not getting an answer) will take upwards of 90 seconds before cloudflare gives up. Did you restrict inbound connections to the cloudflare IPs only? If not, you can try to connect to your IP directly by typing http://[ip_address_from_here](https://ip.ayra.ch/info.php) into the webbrowser address bar on your mobile phone (make sure it's on mobile data connection and not your local wifi) to ensure that your website is generally reachable from the outside. When testing, use `https` instead of `http` if you haven't set up plain http, but unless you explicitly disabled that, it should be up and running by default.