1

I am looking to host a series of self-contained Meteor apps on a single server on our local network. Ideally the URLs would look like:

http://servername/app1

http://servername/app2

etc...

I've tried using mup (meteor up) but that somehow doesn't work (I'm not entirely sure if that's a problem with the way I've set up the VM I'm trying this on or with mup itself)

I'm now trying Passenger, and after going through the tutorial for setting up nginx for Meteor apps, it turns out that frustratingly, the chapter(s) of multi-tenancy on Passenger have not yet been created!

I'm not a node expert, so I'm kind of diving in at the deep end.

Ideally, I'd not have to worry about running the node apps myself, as it looks like Passenger should be able to handle that itself. Is there a good piece of documentation on how to set up Passenger for these kind of scenarios?

Alex Crouzen
  • 75
  • 1
  • 3
  • Welcome to Stackoverflow. It is really hard to provide help in a single answer to this problem as there are many dependents and unknowns. I think with your issue you will get better response on the [Meteor forums](https://forums.meteor.com). However, if you still like to attract answer on Stackoverflow, you may have to get more specific (nginx config, paths of the app, environment variables, passenger or mup config, node version, package.json, what exactly failed on which step, error messages etc.) on your setup. – Jankapunkt Feb 18 '19 at 19:43

1 Answers1

1

You can host multiple meteor apps on a single server, using mup. The mup.js file for should all point to the same server, but each should specify a unique domain.

Using the following 2 mup.js files you would have apps hosted at:

// app1/mup.js

module.exports = {
  servers: {
    one: {
      host: '45.76.111.111',
      username: 'root',
      password: 'password'
    }
  },

  app: {
    name: 'App1',
    env: {
      // If you are using ssl, it needs to start with https://
      ROOT_URL: 'http://app1.servername.com',
    },
  },

  // Use the proxy to setup ssl and to route requests to the correct
  // app when there are several apps
  proxy: {
    domains: 'app1.servername.com',
  }
};

// app2/mup.js

module.exports = {
  servers: {
    one: {
      host: '45.76.111.111',
      username: 'root',
      password: 'password'
    }
  },

  app: {
    name: 'App2',
    env: {
      // If you are using ssl, it needs to start with https://
      ROOT_URL: 'http://app2.servername.com',
    },
  },

  // Use the proxy to setup ssl and to route requests to the correct
  // app when there are several apps
  proxy: {
    domains: 'app2.servername.com',
  }
};

ninjaPixel
  • 6,122
  • 3
  • 36
  • 47