Two instances of Meteor.JS, subdomains

How can I start two instances of a meteor, each with its own application on the same server in a different domain (for example: foo.com and tree.com)?

The most viable option that I'm thinking of right now is to use different ports and redirect nginx to these ports on localhost. Subsequently, I set the correct absolutePath for the Meteor.

Any other options without using e.g. nginx?

+1
source share
1 answer

Meteor does not currently process the HTTP host header to distinguish between the two applications. You will need to run different instances on different ports if you really want to use the same computer.

It depends on what you do. Everything that proxies data identifying the request through the host header is your best bet (nginx),

Alternatively, you can create a custom node.js application (circular motion app) to correctly proxy data, look at another question

Does Node.js support multiple server load balancing?

and change the ports to what you want and add a condition to the http host property if you don't want to use nginx.

+1
source

All Articles