Costa Michailidis
Costa Michailidis

Reputation: 8188

Can I run more than one app on an instance of Amazon EC2?

I admit the answer is probably obvious, but I'm new to server administration, and despite Googling and reading through Amazon's docs I can't seem to figure this out.

Can I run more than one Application on one instance of EC2? Maybe on separate ports? Is it more security prudent to run a single application per instance? What about a Database, can I run CouchDB along with Node on one EC2 instance?

Upvotes: 1

Views: 436

Answers (1)

Daniel
Daniel

Reputation: 38849

Yes, you can run more than on application per instance. You could potentially run them on different ports if you don't mind appending a port number to your http urls. yourdomain.com/ & yourdomain.com:8080.

There's nothing wrong with that approach, but you can also run virtual domains in a single Node.js instance using the vhost directive.

Of you can put an Nginx server in front and reverse proxy to two or more server processes in the background so you can mix and match servers like Node.js and Apache/PHP all on the same EC2 instance.

Upvotes: 3

Related Questions