ChrisRich
ChrisRich

Reputation: 8716

AWS Node.js multiple apps / urls

Is it possible to run multiple node apps on multiple domains on a single AWS EC2 instance?

If so, what kind of stack would you need?

Upvotes: 0

Views: 262

Answers (1)

DevAlien
DevAlien

Reputation: 2476

The easiest way is to use nginx and set up virtual hosts and configure your nodejs instances to use different ports. Once you know the ports of your app you can configure different domains on those ports.

https://www.digitalocean.com/community/tutorials/how-to-host-multiple-node-js-applications-on-a-single-vps-with-nginx-forever-and-crontab

Here's how to do that, the guide is for digitalocean but applies to EC2, since it's like a real machine anyway.

Upvotes: 1

Related Questions