AH01114: HTTP: failed to make connection to backend

Hello, so I have one main domain and multiple custom domains, all of them in Cloudflare. For the purpose of this post, lets call them:

These links below, are actually working link structures:

Since those clients want to access their site content via their own domains, I added this vhost configuration on my apache .conf files on my server:

Main domain

<VirtualHost myserver:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /www/example/html/
ErrorLog /www/example/logs/error
</VirtualHost>

Custom Domain 1

<VirtualHost myserver:80>
ServerName customdomain1.com
ServerAlias www.customdomain1.com
ErrorLog /www/example/logs/error_customdomain1
RewriteCond %{HTTP_HOST} ^(www\.)?customdomain1\.com$
RewriteRule ^/(.*)$ https://example.com/customdomain1/$1 [P]
</VirtualHost>

Same goes for customdomain2.com. It has been working fine like this for a long time. But today, all of a sudden, the custom domains are not loading anything (the main domain is loading fine) and I found this messages on the error logs of both customdomain1 and customdomain2:

[Thu Jun 15 02:31:03.920568 2023] [proxy_http:error] [pid 14235] [client 172.70.115.39:60562] AH01114: HTTP: failed to make connection to backend: example.com

[Thu Jun 15 02:32:42.313809 2023] [proxy:error] [pid 14775] (70007)The timeout specified has expired: AH00957: HTTPS: attempt to connect to 104.21.30.6:443 (*) failed

[Thu Jun 15 02:32:42.313899 2023] [proxy_http:error] [pid 14775] [client 162.158.90.231:56266] AH01114: HTTP: failed to make connection to backend: example.com

[Thu Jun 15 02:39:28.002638 2023] [proxy:error] [pid 16242] (70007)The timeout specified has expired: AH00957: HTTPS: attempt to connect to 172.67.150.42:443 (*) failed

[Thu Jun 15 02:39:28.002728 2023] [proxy_http:error] [pid 16242] [client 162.158.106.252:33090] AH01114: HTTP: failed to make connection to backend: example.com

[Thu Jun 15 04:02:16.344630 2023] [proxy:error] [pid 23201] (70007)The timeout specified has expired: AH00957: HTTPS: attempt to connect to 172.67.150.42:443 (*) failed

[Thu Jun 15 04:02:16.344752 2023] [proxy_http:error] [pid 23201] [client 172.71.182.79:55548] AH01114: HTTP: failed to make connection to backend: example.com

[Thu Jun 15 04:43:25.758885 2023] [proxy:error] [pid 26353] (70007)The timeout specified has expired: AH00957: HTTPS: attempt to connect to 172.67.150.42:443 (*) failed

[Thu Jun 15 04:43:25.759010 2023] [proxy_http:error] [pid 26353] [client 141.101.77.63:48596] AH01114: HTTP: failed to make connection to backend: example.com

[Thu Jun 15 04:45:20.698615 2023] [proxy:error] [pid 26553] (70007)The timeout specified has expired: AH00957: HTTPS: attempt to connect to 104.21.30.6:443 (*) failed

[Thu Jun 15 04:45:20.698739 2023] [proxy_http:error] [pid 26553] [client 172.71.182.79:26402] AH01114: HTTP: failed to make connection to backend: example.com

Any suggestions will be greatly appreciated! Thanks.

First thing, your server does not seem to be configured for HTTPS. You need to fix that.

Apart from that, server administration related questions are unfortunately beyond the scope of the forum. I’d refer to StackExchange or Reddit.

Bottom line, make sure your sites load fine on HTTPS without Cloudflare, then it will also work on Cloudflare.

Hi @sandro – thanks for the quick reply. The sites are actually using https with Cloudflare’s SSL certificates (Flexible). Shouldn’t that be enough?

I’ll try to find the server admin solution in SO as suggested.

No, that’s not enough, that’s actually an insecure legacy mode which will break your site.

You do need a certificate on your server.

Switch that to Full Strict and make sure the server is properly configured for SSL. Once that works, Cloudflare will also work.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.