Let's compile the CloudFlare settings

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Suggested Hosts
User avatar
halil16
Registered User
Posts: 1466
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Let's compile the CloudFlare settings

Post by halil16 »

It is difficult to find a clear solution to some things. Here, let's talk about the settings we made when using CloudFlare for phpBB.

First of all, I disabled CloudFlare cache as a page rule. Because I trust phpBB cache. Am I wrong about this?

When connected to CloudFlare, when post a topic or post a reply or send a PM, it takes a very long time for the form to be sent. Normally, a new page appears very soon after clicking the Submit button, but when connected to CloudFlare, it takes a very long time. I couldn't make the right settings. I tried almost everything. I set some WAF rules, but I'm not sure if I did it right. What do you recommend for this? What should we do?
Buy me a coffee ☕
Hire me for your phpBB board. 🚩
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
O BeldeThatTowns
"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2544
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦

Re: Let's compile the CloudFlare settings

Post by P_I »

I don't (currently) use CloudFlare however I do find it educational to have crowdsourced "Best practices" such as this to aid anyone running a phpBB board.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
nou nou
Registered User
Posts: 734
Joined: Sat Oct 29, 2016 8:08 pm

Re: Let's compile the CloudFlare settings

Post by nou nou »

I've given CF a proper chance several times and it simply borks my forum. And if it doesn't outright bork it, I get heaps and heaps and heaps of user reports complaining about performance.

I'm not doing it again and am recommending against it for forums, I find it consistently rubbish. YMMV.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6541
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Let's compile the CloudFlare settings

Post by thecoalman »

Overall if you are using the default settings in CL the only thing you should need to do to get phpBB to work correctly is either using remote_ip to restore the users IP or use one of the the extensions for phpBB.
halil16 wrote: Wed Jan 08, 2025 2:52 pm First of all, I disabled CloudFlare cache as a page rule. Because I trust phpBB cache. Am I wrong about this?
phpBB's cache has completely different functionality than CL's cache. By default CL only caches common files that would typically be cached by browser. JS, CSS, images etc. By caching these files on CL they are delivered faster to the client and it reduces server load.

The only time this is an issue is if you change the file. If for example it's CSS file change the hash value in stylesheet.css for the file you edited to anything and purge phpBB's cache to increase the asset value. This will force the browser and CL to download stylesheet.css and any files with different hash value. This is something you will want to do regardless of whether you are using CL or not because the browser has these files cached.

Quick tip, go into caching section, make sure caching level is set to standard and then go to caching rules. Create a new rule:

URI - Contains - /coal-forum/download/file.php?avatar=

Make it eligible for the cache. You can also remove the avatar= part so it will cache all files but this will break phpBB permissions for files.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
Marek Muc
Registered User
Posts: 150
Joined: Tue Sep 04, 2018 2:59 pm
Location: Warsaw, Poland

Re: Let's compile the CloudFlare settings

Post by Marek Muc »

My two cents: it’s still worth using Cloudflare even if you set a rule to completely bypass the cache for phpBB pages. In my experience, CF has the best bot protection available. The bypass cache rule is particularly useful if phpBB is just one part of a larger website where CF’s features can be useful. Sure, the speed will take a hit compared to not using CF at all, but I reckon forum users tend to be more dedicated and therefore more patient (though, let’s face it, no solution is perfect).

Return to “phpBB Discussion”