简体   繁体   English

我可以在Amazon EC2的实例上运行多个应用吗?

[英]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? 我可以在一个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? 那么数据库呢,我可以在一个EC2实例上运行CouchDB和Node吗?

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. 如果您不介意在您的http网址上附加端口号,则可以在不同的端口上运行它们。 yourdomain.com/ & yourdomain.com:8080 . 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. 这种方法没有任何问题,但您也可以使用vhost指令在单个Node.js实例中运行虚拟域。

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. 你可以将Nginx服务器放在前面,将反向代理放在后台的两个或多个服务器进程中,这样你就可以在同一个EC2实例上混合和匹配Node.js和Apache / PHP等服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在一个EC2实例上运行多个应用程序 - How to run more than one app on one instance of EC2 无法在Amazon EC2上运行node.js应用 - Can't run node.js app on Amazon EC2 在笔记本电脑上运行时,nodeJS脚本可以连接到AWS MySQL Server,但在Amazon EC2实例上运行时,不能连接到AWS MySQL Server。 - nodeJS script can connect to aws mySQL server when run on laptop, but not when run on amazon EC2 instance 为什么不在一个Amazon EC2实例上运行Node.js和Neo4j - Why not to run Node.js and Neo4j on one Amazon EC2 instance 您如何从本地计算机上的nodejs项目在Amazon EC2实例中运行Shell脚本? - How can you run a shell script in Amazon EC2 Instance from nodejs project in my local machine? 如何在节点js中运行多个应用程序? - How can i run more than one app in node js? 我目前在端口 3000 上运行我的 amazon ec2 实例。我想在端口 80 上运行它。 我该怎么做? - I currently run my amazon ec2 instance on port 3000. I want to run it on port 80 instead. How can I do it? 无法在Amazon EC2实例上运行Node.js child_process - unable to run nodejs child_process on amazon ec2 instance 在Amazon EC2实例上负载测试node.js应用 - Load testing node.js app on Amazon EC2 instance 是否有其他选项可以在 ec2 实例上运行多个节点应用程序 - Is there any other option to run multiple node app on ec2 instance
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM