简体   繁体   中英

Ruby on Rails app showing index of RAILS_ROOT

I am deploying an app on Ubuntu 10 using Passenger 2.2.15, Rails 2.3.5, Ruby 1.8.7, and Apache 2.2.14. When I open http://localhost/appname it displays the contents of the app's root directory (/var/www/appname). Currently passenger and apache seem to be installed correctly, but this error persists.

/etc/apache2/sites-enabled/appname is a logical link of /etc/apache2/sites-available/appname.

My files and their (relevant) contents:

/etc/apache2/sites-available/appname

<VirtualHost *:80>
    DocumentRoot /var/www/appname/public
</VirtualHost>

/etc/apache2/mods-available/passenger.conf

<IfModule passenger_module>
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15
   PassengerRuby /usr/bin/ruby1.8
</IfModule>

/etc/apache2/mods-available/passenger.load

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so

When I restart apache2, the following is left in the errors log file: [Thu Sep 02 16:09:09 2010] [notice] caught SIGTERM, shutting down [Thu Sep 02 16:09:10 2010] [notice] Apache/2.2.14 (Ubuntu) Phusion_Passenger/2.2.15 PHP/5.3.2-1ubuntu4.2 with Suhosin-Patch configured -- resuming normal operations

Thanks for any help you guys can offer, been chewing on this a couple of hours now.

-RM

您有其他虚拟主机与DOC_ROOT / var / www

is your site only listed in

/etc/apache2/sites-available/appname

or also in

/etc/apache2/sites-enabled/appname

?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM