なぜapacheファイルだけが表示されるのですか。乗客ページが表示されないのはなぜですか?
何がそれを公的/公的であると指摘しているのですか?static_pagesコントローラーを使用しているため、index.htmlファイルを削除しました
12296#0: *4 "/var/www/sample_app/releases/20120522195731/public/public/index.html" is not found
(2: No such file or directory), client: 127.0.0.1, server:
これは私がURLに行くときに表示されるものです
Index of /
[ICO] Name Last modified Size Description
[TXT] 404.html 22-May-2012 19:57 728
[TXT] 422.html 22-May-2012 19:57 711
[TXT] 500.html 22-May-2012 19:57 643
[IMG] favicon.ico 22-May-2012 19:57 0
[ ] passenger.3000.log 22-May-2012 21:35 488
[ ] passenger.3000.pid.lock 22-May-2012 21:36 0
[TXT] robots.txt 22-May-2012 19:57 204
server.silvernightfall.comポート80のApache/2.2.20(Ubuntu)サーバー
apache2.confを編集しました
LoadModule passenger_module /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12
/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby
そして、apache2 / sites-available/serverを編集しました
<VirtualHost *:80>
ServerAdmin victoria@jbyte.com
ServerName server.silvernightfall.com
# ServerAlias
DocumentRoot /var/www/sample_app/current/public
ErrorLog /var/www/sample_app/error.log
RailsEnv production
<Directory "/var/www/sample_app/current/public">
Options Indexes FollowSymLinks MultiViews
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
静的ページコントローラー
class StaticPagesController < ApplicationController
def home
end
def help
end
def about
end
def contact
end
end
そしてルートページ
SampleApp::Application.routes.draw do
root :to => 'static_pages#home'
match '/signup', to: 'users#new'
match '/help', to: 'static_pages#help'
match '/about', to: 'static_pages#about'
match '/contact', to: 'static_pages#contact'
end
私がそれを台無しにする可能性があると思う他の唯一のものはdeploy.rbです
# The name of your app
set :application, "sample_app"
# The directory on the EC2 node that will be deployed to
set :deploy_to, "/var/www/#{application}"
set :keep_releases, 3
# deploy with git
set :scm, :git
set :repository, "git@github.com:SilverNightFall/sample_app.git"
set :git_shallow_clone, 1
set :branch, "master"
set :use_sudo, true
# gets ssh info
set :user, "ubuntu"
ssh_options[:keys] = ["/Users/Victoria/Documents/ServerKeys/key.pem"]
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
# The address of the remote host on EC2 (the Public DNS address)
set :location, "server.silvernightfall.com"
# setup some Capistrano roles
role :app, location
role :web, location
role :db, location, :primary => true
after 'deploy:update_code', 'deploy:symlink_db'
namespace :deploy do
desc "Restart Application"
task :restart, :roles => :app do
run "touch #{deploy_to}/#{shared_dir}/tmp/restart.txt"
end
desc "Symlinks the database.yml"
task :symlink_db, :roles => :app do
run "ln -nfs #{deploy_to}/shared/config/database.yml
#{release_path}/config/database.yml"
end