Reputation: 93
How can I run two instance of meteor, each with it's own application on the same server on a different domain (ex: foo.com and tree.com)?
The most viable option I currently can think of is to use different ports and have a redirect in nginx to those ports on localhost. Afterwards I set the correct absolutePath for Meteor.
Any other options without using for example nginx?
Upvotes: 1
Views: 810
Reputation: 75945
Meteor currently doesn't process the http host header to distinguish between two applications. You would have to run different instances on different ports if you really want to use the same machine.
It depends on what you're putting this on. Anything to proxy the data identifying the request via the host header is your best bet (nginx),
Additionally, you could a custom node.js app (a round-robin like app) to proxy the data correctly, have a look at another question
Node.js supports multiple load balance across servers?
and modify the ports to what you want and add in a condition on the http host property, if you don't want to use nginx.
Upvotes: 1