I feel like the most foolish man in the world. This is the first time I am using capifony, but I cannot get it works.
My idea is, for test purposes, make a deploy locally.
I have two virtual servers:
<virtualhost *:80>
DocumentRoot "/usr/local/webserver/www/development/myapp/web"
ServerName myapp
ServerAlias local.myapp.com
CustomLog "/usr/local/webserver/www/development/log/development.log" combined
ErrorLog "/usr/local/webserver/www/development/log/development.log.error.log"
<directory "/usr/local/webserver/www/development/myapp/web">
AllowOverride none
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</directory>
</virtualhost>
<virtualhost *:80>
DocumentRoot "/usr/local/webserver/www/production"
ServerName myapp.production
ServerAlias production.myapp.com
CustomLog "/usr/local/webserver/www/production/log/production.log" combined
ErrorLog "/usr/local/webserver/www/production/log/production.log.error.log"
<directory "/usr/local/webserver/www/production">
AllowOverride none
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</directory>
</virtualhost>
My "production" server has a "log" folder and "index.php" file which I can open from my browser with "production.myapp.com". This is my deploy.rb file:
set :application, "myapp"
set :domain, "production.#{application}.com"
set :deploy_to, "/usr/local/webserver/www/production/#{application}"
set :app_path, "app"
set :web_path, "web"
set :repository, "file:///usr/local/webserver/www/development/myapp"
set :scm, :git
set :deploy_via, :copy
set :branch, "development"
set :update_vendors, true
set :use_sudo, false
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none`
set :model_manager, "doctrine"
set :dump_assetic_assets, true
# Or: `propel`
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Symfony2 migrations will run
set :keep_releases, 3
# Be more verbose by uncommenting the following line
logger.level = Logger::MAX_LEVEL
But I get this error when I execute cap deploy:setup
servers: ["production.myapp.com"] connection failed for: production.myapp.com (Errno::ECONNREFUSED: Connection refused - connect(2))
I can ping production.myapp.com, and I can open it with my browser. Why am I getting "connection failed"? The application in the development environment is working.