$ gem install passenger
$ passenger-install-apache2-module
$ vi /etc/httpd/conf.d/passenger.conf
--
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p0@set1/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p0@set1/gems/passenger-3.0.11
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p0@set1/ruby
RailsEnv development
--
$ vi /etc/httpd/conf.d/virtualhost.conf
--
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /var/www/html/
RailsBaseURI /demo
</VirtualHost>
------------
$ cd /var/www/html
$ ln -s /var/ruby/demo/public ./demo
$ /etc/rc.d/init.d/httpd restart
这样在浏览器中访问 demo 时,直接把 Rails 项目的 public 目录一览显示出来了,问题出在哪?Passenger 没启动?