522 timeout error on newly added domain


#1

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:

  • 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?


#2

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.


#3

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.


#4

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