passenger + apache

阙俊友
2023-12-01
编译安装passenger

passenger.tar.gz

tar zxvf   passenger.tar.gz
cd passenger
./bin/passenger-install-apache2-module

输出在apache的配置文件中添加
   LoadModule passenger_module /home/users/nieyinghui/tools/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
   PassengerRoot /home/users/nieyinghui/tools/gems/passenger-3.0.11
   PassengerRuby /home/users/nieyinghui/software/ruby/bin/ruby
命令,在httpd.conf中添加上述语句后,用以下的命令将rails命令部署上,使得passenger监听

<VirtualHost *:80>
      ServerName www.yourhost.com
      DocumentRoot /somewhere/public    # <-- be sure to point to 'public'!
      <Directory /somewhere/public>
         AllowOverride all              # <-- relax Apache security settings
         Options -MultiViews            # <-- MultiViews must be turned off
      </Directory>
</VirtualHost>
 类似资料: