参照本社区上的 wiki,我在虚拟机上面安装配置好了 Ruby1.9.3/Rails3.2。 gem install passenger 没报错。 并用 rvmsudo passenger-install-nginx-module 安装配置好了 nginx,不过 nginx 是自己编译安装的,个人觉得配置没错(使用默认配置)。 nginx.conf 中配置
worker_processes 1;
events {
worker_connections 1024;
}
http {
passenger_root /home/deployer/.rvm/gems/ruby-1.9.3-p392@rails32/gems/passenger-3.0.19;
passenger_ruby /home/deployer/.rvmwrappers/ruby-1.9.3-p392@rails32/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
root /home/deployer/project/demo1/public;
passenger_enabled on;
}
}
但是用浏览器打开 localhost,始终报 403,这是哪里出错了呢?