Apache2 reverse proxy mp4


I use kevinGodell/node-red-mp4frag in my flows, which also works well, now I have made nr accessible via a reserve proxy ssl, which also works so far, except that no videos are played, how can I fix this?

{id: 'ui_mp4frag_video_5301cb808261fec3', level: 'error', msg: {…}}

Kind regards

I assume it is because the node-red-mp4-frag node is not aware of your proxied url, whatever basepath you have entered? Because you cannot add a prefix before the "mp4frag" sub path:


But I don't know enough about the internals of this node, so I might be mistaken. This node has its own internal ExpressJs instance, apart from the standard Node-RED one if I am not mistaken...

Think it is better if we call the big boss of all mp4 related stuff in Node-RED, mister @kevinGodell

Well, I changed httpNodeRoot in the settings.js file and all of my video stuff on the backend and front end followed it to the new path and plays ok for me in the node-red-dashboard.

httpNodeRoot: '/bart-was-mistaken',

Unfortunately, I know less than zero about proxies and their usage or configuration. Are special headers needed on the backend to tell the proxy to be trusted? Has the proxy been configured to also reroute the socket.io connections? Are you using http hls.js or native hls in safari mobile browser? Are you using an old versions of mp4frag or did you install it from palette? At this point, I can only offer questions.

1 Like

It should be the new version and socket.io will be redirected. It runs in chrome and it tries to call "https://domain/ui_mp4_frag/hls.js" with error 404 what should the url be ....
Kind regards

Do you have to be specific about every http route when setting up the proxy? That sounds tricky.

Opening the developer console in my browser on a standard non-proxied node-red-dashboard, I can see the hls.js is loaded at domain:port/ui_mp4frag/hls.min.js. I am not sure if that will help you.

So I've tried a few things, websocket wasn't quite available either, it's working now....
there are now 2 errors, on the one hand "/ui_mp4frag/hls.min.js" cannot be called and on the other hand "/loading.html" both are for playback right?

I think it fails because the URL is taken from Apache.conf with the /ui at the end "http://ip:port/ui/ui_mp4frag/hls.min.js" which then fails because it says "http ://ip:port/ui_mp4frag/hls.min.js" should be correct?

Does that mean that that you can now play the video using the socket. io option?

I still don't know how the reverse proxy works and hopefully you can educate me a little. Do you have to add every single route to the proxy for it to work, or just the entry point, such as the /ui ?

That is done from node-red-dashboard. I think you can make a custom loading page, but not really sure.

I just installed and configured an nginx reverse proxy and it is working perfectly without having to modify the node-red instance or any nodes, other than turning off the https cert stuff and moving that to nginx. I can guarantee that my nodes are at the very least, nginx compatible.

Hello super sanke, I've now made it with Apache too :+1::+1: Thanks for the node.
Kind regards

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.