Cloudflare and ssl on apache2 521 Web server is down

I have webpage hosted on apache2 on Ubuntu and Cloudflare . I configured SSL on Apache and now I want to change to not use SSL from Cloudflare but from the Apache on Ubuntu. Configuration in '/etc/apache2/sites-available/my-web-ssl.conf`:

SSLCertificateFile     /etc/ssl/certs/myweb.crt
SSLCertificateKeyFile   /etc/ssl/certs/myweb_priv.key
SSLCertificateChainFile /etc/ssl/certs/ComodoRSACA.crt

Test apache2 configuration:

 sudo apachectl configtest
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK

But when I change in Cloudflare SSL on full it doesn’t work:

ERROR 521

According to this list: Cloudflare tip fixing error 521

I added every port to allowed in ufw:

sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
Apache                     ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
22/tcp                     ALLOW       Anywhere
20,21,10000:10100/tcp      ALLOW       Anywhere
13/tcp                     ALLOW       Anywhere
14/tcp                     ALLOW       Anywhere
18/tcp                     ALLOW       Anywhere
15/tcp                     ALLOW       Anywhere
17/tcp                     ALLOW       Anywhere
29/tcp                     ALLOW       Anywhere
32/tcp                     ALLOW       Anywhere
Apache (v6)                ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
22/tcp (v6)                ALLOW       Anywhere (v6)
20,21,10000:10100/tcp (v6) ALLOW       Anywhere (v6)
13/tcp (v6)                ALLOW       Anywhere (v6)
14/tcp (v6)                ALLOW       Anywhere (v6)
18/tcp (v6)                ALLOW       Anywhere (v6)
15/tcp (v6)                ALLOW       Anywhere (v6)
17/tcp (v6)                ALLOW       Anywhere (v6)
29/tcp (v6)                ALLOW       Anywhere (v6)
32/tcp (v6)                ALLOW       Anywhere (v6)

In httpd.conf I don’t have any modules listed in above list. But still have 521 error

What’s the URL giving the 521 error?

Also, here are troubleshooting steps for 5xx server errors

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