I’m not sure if this is your problem, but it might be. Let me give you some context.
A mobile client decides where to connect to based on the settings in the generated index.html. These settings take their values based on environment variables that can either be set directly or be controlled with command options.
If you’re using
meteor build, you can specify the server to connect to with the
--server option (this is similar to the
--mobile-server option for
meteor run). This sets the ROOT_URL and DDP_DEFAULT_CONNECTION_URL in the generated index.html.
Because subsequent updates delivered through Hot Code Push replace the initially bundled index.html with a freshly generated one, the server should also be configured with the right connection URL. Otherwise, the client may not be able to connect, or perhaps connect to the wrong server, after a Hot Code Push.
meteor deploy takes care of setting these values automatically, so there is no need to specify anything in that case… But when deploying on your own server, you have to make sure to set at least the ROOT_URL environment variable (DDP_DEFAULT_CONNECTION_URL defaults to the same value). For Meteor Up, you can configure this in
Having said all this, I’m not sure why in your case the first app works correctly, and the second one connects to the first. How are you hosting multiple apps on the same server? Using Nginx vhosts by any chance?