I’ve trying to find a way to change the websocket URL, like this:
From:
wss://{DOMAIN}/websocket
To:
wss://{DOMAIN}/websocket-admin
I have 2 meteor apps running on the same server & domain and would like to configure the Apache server to proxy URLs and their websockets to the appropriate app based on URL:
This might not match your overall url schema, but you can set one Meteor app to behind a path like /admin/* by setting the environment variable ROOT_URL to include /admin/.
Then Meteor sets that path as the path-prefix that’s used for the websocket url here:
Alternatively, you can use a local fork of ddp-server with the websocket-url of your choosing. You’ll also need to tell the client where to connect to. This is probably easiest done with the DDP_DEFAULT_CONNECTION_URL environment variable, but you’ll need to experiment a bit.
You can make local forks of core packages by copying the package folder from Meteor’s github into your /packages folder. Meteor always checks the packages/ folder first when deciding which version of a package to use
Thanks coagmano, I ended doing your first suggestion, appending /admin to the ROOT_URL. I had to mess up with the routing in the app but that seems to work fine now.
Thanks coagmano, I ended doing your first suggestion, appending /admin to the ROOT_URL. I had to mess up with the routing in the app but that seems to work fine now.
@zpatrick I know this is an old post but still. I tried appending /prefix to the ROOT_URL in env variable and in gateway I have configured the path /prefix/websocket. Yet it is failing. Am I missing something here??