522 timeout error on newly added domain

I am getting a 522 error on getsmartbird.com but am not sure why. I have two domains on one Apache server, both virtual hosts. Both use Cloudflare and are DigitalOcean droplets. The first (smartbird.io) works perfectly. The second (getsmartbird.com) works perfectly when I add the IP to my Windows hosts file.

I followed these instructions:
https://support.cloudflare.com/hc/en-us/articles/200171906-Error-522-Connection-timed-out

  • Web server is not overloaded. Requests work fine to smartbird.io (on the same server) and the server is not in use yet. Load average is below 1, plenty of memory free, very low I/O. Server is not overloaded.
  • Cloudflare requests are not blocked. Requests work fine to smartbird.io.
  • Networking is not faulty. Requests work fine to smartbird.io.
  • Keepalives are not disabled.

It could? be a misconfiguration in my Apache. But again, requests go through when I add the IP to my hosts file, so I would think that would rule out misconfiguration.

Ideas?

I don’t see a 522 timeout, I see that www.getsmartbird.com does seem to work; well, kind of work. It sends a 301 response that sends the user agent back to itself (?) and causing an infinite redirect loop.

1 Like

I just solved the problem. Edited /etc/apache2/sites-available/smartbird.io.conf (the conf file for the first virtual host), the <VirtualHost *:80> setting, to <VirtualHost *:443>. And the same with the getsmartbird.io.conf.

I had noticed that if I opened port 80 then I was getting the 301 redirect loop, which was progress.

So if someone browses this post in the future, and you have port 80 blocked, unblock it. If your 522 changes to a redirect loop, try changing the VirtualHost settings.

This topic was automatically closed after 31 days. New replies are no longer allowed.