Proxy port 1880 behind Apache

I need to proxy the Node-RED console (http://host_name:1880) behind Apache. The page comes down fine, but all of the resources required by the page fail with:
Status Code: 502 Proxy error -
Remote Address: (Apache IP)
Referrer Policy: strict-origin-when-cross-origin

I checked high and low on Google, but I haven't been able to find anything. Do anyone have any suggestions?

TIA

THere are various reasons you might get a 502 but the most likely in the case of Node-RED is that the translated request no longer makes sense to Node-RED and so the proxy gets the equivalent of shrugged shoulders.

Check the Apache logs for errors coming back from Node-RED.

You haven't told us what resources you are asking for nor what kind of page you are requesting so it is hard to give more specifics. Node-RED has many options for serving up web resources: the static folder, built-in admin resources, all of the dashboard resources, http-in/-out resources, uibuilder resources, etc.

The homepage is what won't load, just the default http://host_name:1880. The HTML comes down, but it errors on the resources required for the HTML.

The 502 is on:

  • jquery-ui.min.css
  • font-awesome.min.css
  • style.min.css
  • vendor.js
  • red.min.js
  • main.min.js
  • favicon.ico

All I saw in the Apache logs before were the 502 errors, but I'll check again to make sure.

You might want to share the relevant part of your Apache config (though not sure I can remember how it should look now, not used Apache for a long time).

I assume that Node-RED and Apache are on the same device?

I found it, it was operator error. :blush:

I added a trailing slash to my ProxyPass directive, and voila! Originally it ended with the port#.

ProxyPass /node-red/ http://127.0.0.1:1880/

@TotallyInformation are you shooting a bow in your avatar? Cool, small world.

Thanks for the help

1 Like

Yes, I went through a an archery phase. I'd love to still do it but there wasn't a nearby club. Found it incredibly relaxing. Something to do with the focus required I think.

That particular day was a notable day out in Sherwood Forrest. My son dressed in his Robin Hood outfit. They had some people allowing longbow demo's and you could have a go. Good fun.

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