I’m trying to host cockpit and a node.js server on the same production server. I’m using Nginx to dispatch the access to the two servers based on the requested url.
The idea is that for any url I’d want to forward the traffic to the node.js server exposed on localhost:3000.
Instead I’d like to forward all the urls starting with ‘cms’ or ‘cockpit’ or any other differentiator to cockpit cms exposed on localhost:8080.
So I’m trying a way to change the cockpit entry point for all its paths. For example:
localhost:8080/auth/login should be localhost:8080/cockpit/auth/login
localhost:8080/collections should be localhost:8080/cockpit/collections
in this way I can tell Nginx to forward any traffic to cockpit cms based on if the url starts with cockpit.