我对亚马逊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