1. Passenger + NginX组合
参考资料:http://www.modrails.com/documentation/Users%20guide%20Nginx.html
gem install passenger
passenger-install-nginx-module然后按照提示操作即可。
它会帮助你依次安装Passenger 和 NginX。这里提示一下:
a. 关闭NginX的方法
pkill -9 nginx
b. nginx经常出现403没有权限访问的问题。
ps -ed | grep nginx 查看进程
及时主进程是root启动,还需要子进程具有访问权限。
譬如nginx将以root启动,修改nginx.conf 如下:
#user nobody;
worker_processes 1;
修改为:
user root;
worker_processes 1;
2. Passenger + Apache组合
gem install passenger
passenger-install-apache2-module
RHEL/CentOS 5
rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
yum install mod_passenger
RHEL/CentOS 6
rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc
yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm
yum install mod_passenger
启动服务
service httpd restart