hmaddy

Well-Known Member
May 6, 2020
350
39
28
Chennai
cPanel Access Level
Root Administrator
i added one domain on cloudflare. hosting is with wordpress. when proxy is enable, then home page will work and inner pages will not work. How to solve this when proxy enable.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,257
2,220
363
cPanel Access Level
Root Administrator
@hmaddy - you have to provide us with more information for your questions. What does "not work" mean - do you get an error? Is the page blank? Do you see anything in the Apache logs on the server side? Have you already reached out to Cloudflare to see what their recommendation is for this setting?
 
  • Like
Reactions: hmaddy

hmaddy

Well-Known Member
May 6, 2020
350
39
28
Chennai
cPanel Access Level
Root Administrator
When we enable proxies on Cloudflare, then WordPress inner pages will throw a white page or timeout error. When we disable the proxy and enable dns only, then no issues everything will be fine.
 

hmaddy

Well-Known Member
May 6, 2020
350
39
28
Chennai
cPanel Access Level
Root Administrator
Thats correct. But my doubt is the same script and configuration is working on another server with proxy
 

hmaddy

Well-Known Member
May 6, 2020
350
39
28
Chennai
cPanel Access Level
Root Administrator
got the following reply from cloudflare.


Error 524 indicates that Cloudflare successfully connected to the origin web server, but the origin did not provide an HTTP response before the default 100 second connection timed out. This can happen if the origin server is simply taking too long because it has too much work to do - e.g. a large data query, or because the server is struggling for resources and cannot return any data in time.

Resolution

Here are the options we'd suggest to work around this issue:

  • Implement status polling of large HTTP processes to avoid hitting this error.
  • Contact your hosting providerto exclude the following common causes at your origin web server:
    • A long-running process on the origin web server.
    • An overloaded origin web server.


Logging request response time at your origin web server helps identify the cause of resource slowness. Contact your hosting provider or site administrator for assistance in adjusting log formats or search for related logging documentation for your brand of web server such as Apache or Nginx.


  • Enterprise customers can increase the 524 timeout up to 6000 seconds using the proxy_read_timeout API endpoint.
  • If you regularly run HTTP requests that take over 100 seconds to complete (for example large data exports), move those processes behind a subdomain not proxied (grey clouded) in the Cloudflare DNS app.
  • If error 524 occurs for a domain using Cloudflare Railgun, ensure the lan.timeout is set higher than the default of 30 seconds and restart the railgun service.
 

rbairwell

Well-Known Member
May 28, 2022
100
43
28
Mansfield, Nottingham, UK
cPanel Access Level
Root Administrator
Can you try the following command from your computer:
Code:
curl -vk --resolve www.example.com:80:192.0.2.127;  http://www.example.com
(replacing www.example.com with your domain name and 192.0.2.127 with the IP address of your server).

If you haven't got access to curl on your computer (say you are running Windows without having WSL2 setup with a local Linux install), running it on the server should be okay.

That'll emulate - to a degree - what Cloudlfare is trying to do when it fetches the page from your site. If you notice it timing out, the problem is 100% on the "server side" (it could be an Apache redirect looping, it could be a long running PHP script etc: just as the Cloudflare resolution bit says). If it works quickly and returns the correct page, then the problem is most likely somewhere between Cloudflare and your site (perhaps the server firewall is blocking their IP address? - it'll be worth tailing the Apache/Nginx logs and the var/log/messages file when you make the request through Cloudflare to see if anything is being triggered.