Using CloudFlare with NodeBB
-
Awesome tutorial. I can remember this being asked pretty frequently (once every other week) when I first started working with NodeBB.
-
So my takeaway from this is that I can use CloudFlare's CDN functionality and route the websockets (which cannot be used on the CloudFlare free plan) around CF so that any image resources on my site can be served from CloudFlare. Correct?
-
@ThingBreaker Exactly Only the websockets directly connect to your server. The rest is connecting over CloudFlare.
-
@lenovouser, excellent! That was my first takeaway - but thought I'd get a plain restatement for anyone who reads this and might be newer to working with a CDN.
-
@lenovouser
Can you share how you dealt with DDOS?
Thanks -
@nanjusoil you can always look into web traffic filtering, traffic shaping, and using a DDoS protected host.
-
@hieudang said:
Thank you . Currently I'm using Incapsula(they supported websocket in freetier) instead CloudFlare
@hieudang umm interesting, maybe you could write a little tutorial using incapsula, tellong a little more what are the advantages over using vloudflare in the free plan and the steps needed to configure their system with nodebb.
-
Just add to Incapsula as normal, but I don't run this case in production, only for testing.
@AOKP You require too much on freetie =))
But if you want, you can try crazy scenario
YourNodeBBServer-->Incapsula-->CloudFlare Universal SSL
Still work with my site
You can check here: https://forum.handcode.net -
@hieudang Even though this seems to work, it definitely makes no sense to create what you did. Everything is going to CloudFlare anyway in your case. The only difference is that there is one more middleman where CloudFlare get's the data for your website from. There will be no speed improvement if you do this.
-
@lenovouser Offcourse, that's why I only use for testing and I say "crazy".
I emphasize "There ain't no such thing as a free lunch".
Someone want cdn, antiddos, ssl more and more but FREE.
Hell no -
@hieudang I understand what you are trying to say, even though CloudFlare does provide all of these 3 things for free. But I don't want to turn this into a Incapsula vs. CloudFlare topic, I think we could create a new one for this in the Discussion category
-
@lenovouser by the way. How would the configs have to look like, if your forum was installed in a folder, e.g. /forum?
-
@AOKP I can create a more easier to understand tutorial later, but here is how it looks for Minora at the moment. (Which is what I think you mean)
Here are our current config files, just copied it out. I think the needed information is in there, don't worry about the includes. That's just part of our structure.
NGINX: https://git.minora.io/snippets/1
NodeBB: https://git.minora.io/snippets/2 -
@AOKP As far as I know, Incapsula supported caching and minify tools
@all Sorry for off-topic, just for fun
OK, back to topic, how many method can I use CloudFlare with NodeBB?-
- Follow lenovouser , but your IP will not be hidden.
-
- Upgrade to Enterprise CloudFlare Plan a lot of money
-
- Use middleman as I said, I'm not sure it will work fine. (IP blacklist...)
-
- Could you guys split one server to listen socket.io? one will serve others request, so we can hide main IP
-
- ???? I'm thinking...
-
-
Just going to drop this here. https://support.cloudflare.com/hc/en-us/articles/200170706-How-do-I-restore-original-visitor-IP-with-Nginx-