It may by your vhost config file. Do you have something like "Options FollowSymLinks" in your Directory do-dad?
I remember having a similar problem when I started using mod_rails and I think that was the issue. Eg. <VirtualHost *:80> ServerName www.testapp.com ServerAlias *.testapp.com DocumentRoot /var/www/testapp/current/public <Directory "/var/www/testapp/current/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> A la http://uhhuhyeah.com/distractions/HowtosetupyourserverforRailsandPassengerPartIII On Mon, Jun 1, 2009 at 9:46 PM, Scott Olmsted <[email protected]> wrote: > > This is probably really basic, but I'm stuck and I haven't found any help > online. > > What would cause my app, instead of showing the home page, to merely list > the contents of the /public directory? > > *Index of /* > > - 404.html <http://www.hitagroup.org/404.html> > - 422.html <http://www.hitagroup.org/422.html> > - 500.html <http://www.hitagroup.org/500.html> > - dispatch.cgi <http://www.hitagroup.org/dispatch.cgi> > - dispatch.fcgi <http://www.hitagroup.org/dispatch.fcgi> > - dispatch.rb <http://www.hitagroup.org/dispatch.rb> > - favicon.ico <http://www.hitagroup.org/favicon.ico> > - files/ <http://www.hitagroup.org/files/> > - htaccess_original <http://www.hitagroup.org/htaccess_original> > - images/ <http://www.hitagroup.org/images/> > - javascripts/ <http://www.hitagroup.org/javascripts/> > - robots.txt <http://www.hitagroup.org/robots.txt> > - stylesheets/ <http://www.hitagroup.org/stylesheets/> > - system/ <http://www.hitagroup.org/system/> > > My first thought is that Rails is not running, but the shared host, under > mod_rails, usually throws up a page when there's a problem. > > This has occurred as the result of some change to the code or deploy.rb, > but deploy.rb is almost unchanged from the original that worked and all the > files and symbolic links seem to be in their proper places. And 'cap > deploy:rollback' successfully rolls back to displaying the home page, > running the previous release. > > Thanks, > > Scott > > > > This new app uses shared hosting at a host where I have another app also, > the other app's deploy.rb file is almost identical and it works. > > The first deployment worked correctly and the app is running. I > symbolically linked a couple directories containing public files by hand, > now I've put that in the Capistrano file (in the :after_symlink task) and > I've broken it, even when I take it back out. > > Deployment executes correctly, no error messages. The code has been loaded, > all the symbolic links, including ~/www on up, look just as they did before, > except for /current pointing to the new release. > > I have made some minor code changes. The code runs fine on my development > machine. > > But instead of displaying the home page in production, the browser shows > the contents of the 'public' directory (if rolled back, it works correctly > again): > > *Index of /* > > - 404.html <http://www.hitagroup.org/404.html> > - 422.html <http://www.hitagroup.org/422.html> > - 500.html <http://www.hitagroup.org/500.html> > - dispatch.cgi <http://www.hitagroup.org/dispatch.cgi> > - dispatch.fcgi <http://www.hitagroup.org/dispatch.fcgi> > - dispatch.rb <http://www.hitagroup.org/dispatch.rb> > - favicon.ico <http://www.hitagroup.org/favicon.ico> > - files/ <http://www.hitagroup.org/files/> > - htaccess_original <http://www.hitagroup.org/htaccess_original> > - images/ <http://www.hitagroup.org/images/> > - javascripts/ <http://www.hitagroup.org/javascripts/> > - robots.txt <http://www.hitagroup.org/robots.txt> > - stylesheets/ <http://www.hitagroup.org/stylesheets/> > - system/ <http://www.hitagroup.org/system/> > > What might be causing this? > > Thanks, > > Scott > > > deploy.rb: > > set :application, "appname" > > # If you aren't deploying to /u/apps/#{application} on the target > # servers (which is the default), you can specify the actual location > # via the :deploy_to variable: > set :deploy_to, "/home/username/rails_apps/appname" > > default_run_options[:pty] = true > > # If you aren't using Subversion to manage your source code, specify > # your SCM below: > set :scm, :git > set :repository, "git://git.assembla.com/appname.git" > set :branch, "master" > set :deploy_via, :remote_cache > > set :user, 'username' > set :use_sudo, false > set :ssh_options, { :forward_agent => true } > > role :app, "access.servername.com" > role :web, "access.servername.com" > role :db, "access.servername.com", :primary => true > > namespace :deploy do > > desc "hook up paths to public files" > task :after_symlink, :roles => :app do > run "ln -s #{shared_path}/member_files #{current_path}/member_files" > run "ln -s #{shared_path}/files #{current_path}/public/files" > end > > desc "Restarting mod_rails with restart.txt" > task :restart, :roles => :app, :except => { :no_release => true } do > run "touch #{current_path}/tmp/restart.txt" > end > > [:start, :stop].each do |t| > desc "#{t} task is a no-op with mod_rails" > task t, :roles => :app do ; end > end > > end > > > > > --~--~---------~--~----~------------~-------~--~----~ SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby -~----------~----~----~----~------~----~------~--~---
