所以我有一个rails应用程序并正在部署到ec2。我成功完成了帽子部署:设置,上限部署:检查和上限:部署。然后我尝试访问该网址,但我不确定我的应用程序在哪里或者是否有更多步骤。我尝试访问http://xxx.us-west-2.compute.amazonaws.com/var/www/highlandsfacebookart,但什么都没有。
这是我的deploy.rb
set :application, "highlandsfacebookart"
set :repository, "repository-url"
set :user, 'ec2-user'
set :use_sudo, false
set :deploy_to, "/var/www/#{application}#"
#set :deploy_via, :remote_cache
set :deploy_via, :copy
set :normalize_asset_timestamps, false
set :ssh_options, { :forward_agent => true }
ssh_options[:keys] = %w(~/highlandsfbkey.pem)
set :scm, "git"
# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "xxx.compute.amazonaws.com" # Your HTTP server, Apache/etc
role :app, "xxx.us-west-2.compute.amazonaws.com" # This may be the same as your `Web` server
role :db, "xxx.us-west-2.compute.amazonaws.com", :primary => true # This is where Rails migrations will run
role :db, "xxx.compute.amazonaws.com"
答案 0 :(得分:0)
当您在aws.amazon.com/console
上访问EC2的控制台时,是否可以验证您的实例是否正在运行? (对不起,我希望我有足够的声誉来发表评论)
答案 1 :(得分:0)
不确定,但您是否已将实例配置为使用Nginx等网络服务器为您的网站提供服务?设置它以便它在端口80上侦听并指向正确的文件夹。我相信Nginx在卡皮斯特拉诺的整合是可能的。