Using CloudFlare with NodeBB
-
@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-
-
@ThingBreaker last time I checked with there live chat... I had 2 people say 2 different things. One said that they didn't support websockets at all (how!?) And the other one said it on there most expansive plans. One thing is for sure. They cannot make up there mind with what package supports what features
-
@lenovouser said:
@L33t Yes, that is normal. An established WebSocket connection is not "closed" until you close the tab. That's why it shows up with so many seconds. You can happily ignore that
Thanks for the clarification. I kinda figured as much, but wanted to make sure.
-
@lenovouser I am aware how to setup NodeBB in a folder, however the issue is that the above given instructions of yours, do not work with a folder based installation.
-
@AOKP are there any errors I could take a look at?
-
@lenovouser basically the same as if you wouldn't use the config.
If you try to visit the forum under the new URL for example (live.<domain.tld>) it is saying that the page wasn't found, so it seems that the "entrance" of it is false. -
Is this working for anyone? I've been struggling trying to make it work. I'm getting an "invalid session" error whenever the site uses websockets.
I have the realip installed and it's working according to my nginx logs.
Seems like it could be something wrong with the forums, the request query is blank (no sid), and doesn't have any cookie. (My Java app, which injects the cookie itself, seems to be working with websockets.)
EDIT: My default cookie settings were somehow incorrect, setting and unsetting fixed it.
-
Good news, CloudFlare will open WebSockets for everyone
https://www.cloudflare.com/websockets/
https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-CloudFlare-with-WebSockets-