安装护栏后,如何在Amazon EC2实例上运行轨道服务器? [英] After installing rails, how to run rails server on amazon ec2 instance?

查看:131
本文介绍了安装护栏后,如何在Amazon EC2实例上运行轨道服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对亚马逊AMI实例安装护栏。我的导轨安装了所有的依赖关系。我甚至通过SCP复制的code。当我ssh到该实例我跑

I installed rails on an instance on amazon AMI. I installed all the dependencies for rails. I even copied the code through scp. When i ssh to the instance i ran

rails s

服务器正在运行。我怎样才能从浏览器中查看它? 从公共DNS ???

The server is running. How can I view it from the browser? from the Public DNS???

推荐答案

您的Amazon EC2实例有一个公网IP地址和域名,看 的http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html

Your amazon ec2 instance has a public ip address and domain name, see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html

使用该域名作为浏览器的URL。

use this domain name as the URL in your browser.

您还必须在该实例的安全组设置入站流量/端口连接。

You will also have to set inbound traffic / port connections in the security group of the instance.

一句警告:与轨道的你已经开始使用WEBrick,那只是意味着在发展中要使用的服务器。你或许应该使用生产服务器像Apache + mod_passenger。

A word of warning: with "rails s" you are starting webrick, a server that is only meant to be used in development. You probably should use a production server like apache + mod_passenger.

有关EC2的更高级的用法和Ruby on Rails看

For more advanced usage of ec2 and ruby on rails see

http://railscasts.com/episodes/347-橡胶和-亚马逊EC2?查看= asciicast

这篇关于安装护栏后,如何在Amazon EC2实例上运行轨道服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆