Ubuntu 11.04配置Apache+Passenger

1、安装apache 
sudo apt-get install apache2
  Ps:打开浏览器,请求http://localhost,出现如下界面,证明安装成功
         It works!
        This is the default web page for this server.
        The web server software is running but no content has been added, yet.


2、安装passenger
 $ sudo gem install passenger
 $ passenger-install-apache2-module
   Ps:根据提示完成安装,如果缺少模块“don't worry, this installer will tell you how to install them”


3、安装完后把最后的代码复制到apache配置文件/etc/apache2/httpd.conf
记得要把注释删掉,不然会出错,删掉后我的配置文件如下:
LoadModule passenger_module /home/zernel/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /home/zernel/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7
PassengerRuby /home/zernel/.rvm/wrappers/ruby-1.9.2-p180/ruby

相关推荐