Я использую Apache passenger для развертывания приложения rails.
Я четко выполнил каждый шаг, и все работает отлично.
Нет сообщения об ошибке при развертывании.
Но сайт не отображается в браузере.
Вот файлы
$ sudo cat /etc/apache2/sites-available/capi_app
<VirtualHost *:80>
ServerName www.passionate4.net
DocumentRoot /var/www/apps/capi_app/public
RailsEnv production
<Directory /var/www/apps/capi_app/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
Я тоже пытался изменить
$ sudo cat / etc / apache2 / sites-available / capi_app
<VirtualHost *:80>
ServerName www.passionate4.net
DocumentRoot /var/www/apps/capi_app/current/public
RailsEnv production
<Directory /var/www/apps/capi_app/current/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
-> При этом, когда я перезапускаю apache, я не получаю сообщение об ошибке (/ / / public) не существует, но сайт по-прежнему не отображается.
@ Мартин
$ sudo cat / etc / apache2 / sites-enabled / capi_app
<VirtualHost *:80>
ServerName www.passionate4.net
DocumentRoot /var/www/apps/capi_app/current/public
RailsEnv production
<Directory /var/www/apps/capi_app/current/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
----------- файл deploy.rb -------------
require 'bundler/capistrano'
#using RVM!
$:.unshift("#{ENV["HOME"]}/.rvm/lib")
require "rvm/capistrano"
set :rvm_type, :user
set :application, "capi_app"
set :deploy_to, "/var/www/#{application}"
role :web, "50.18.155.154" # Your HTTP server, Apache/etc
role :app, "50.18.155.154" # This may be the same as your `Web` server
role :db, "50.18.155.154", :primary => true # This is where Rails migrations will run
default_run_options[:pty] = true
set :repository, "git@github.com:jaipratik/capi_app.git"
set :scm, :git
set :branch, "master"
set :user, "ubuntu" #if error use whats shown in podcast
set :use_sudo, false
set :admin_runner, "ubuntu"
set :rails_env, 'production' #<<<<<<<<<< NEW
#set :use_sudo, false #if error delete this
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
ubuntu @ ip-10-166-185-18: ~ $ ls -l / var / www / apps / capi_app
всего 8
lrwxrwxrwx 1 ubuntu ubuntu 46 2011-11-17 19:04 ток -> / var / www /
приложения / capi_app / релизы / 20111117190420
drwx-w ---- 5 Ubuntu Ubuntu 4096 2011-11-17 19:04 релизы
drwx-w ---- 6 ubuntu ubuntu 4096 2011-11-17 09:48 поделился
убунту @ IP-10-166-185-18: ~ $