The funny thing here is that I just noticed that I broke my page rule for bypassing cache on accident some time ago (made a typo) and it wasn't working, and here I am helping someone deal with a problem I didn't actually solve until now XD
I put the version right at the beginning so there is just one place to change it (a script and variable would be better, but I'm lazy.) I do the NPM install manually because it used to fail. Been using the same command since the 0.6.0 days, I'd guess. And I add the log at the end so that if I look away, I always see the log scrolling to know that things are okay.
(without these two lines you will get errors when you try to display the main page because Apache adds "index.html" by default to the request which gets then handled by Nodebb because of the two lines below these first two - but there is no index.html to handle because of the way Nodebb is built)
NC = ignore case
P = proxy, so that it is invisible to the user (they don't see the :4567)
L = last rule, we stop if match is found
Third line matches only your host without the trailing /somepage.html or /images/someimage.png or what ever. And the last line replaces that with some.example.com:4567/ and adds the rest of the address with $1
This is rather useful if you are already running other websites besides the Nodebb forums with Apache on the same server. Because if you use the instructions in the documentation for ProxyPass you will get all of your web traffic rerouted with that configuration (unless you are running Nodebb from a subfolder, I think?)