ruby-on-rails - 尝试将 Passenger/Nginx 用于我的 Rails 生产服务器,出现 403 错误

标签 ruby-on-rails linux ruby-on-rails-3 nginx ubuntu-12.04

我正在尝试让我的生产服务器在我的 Ubuntu 12.04 LTS 服务器上启动并运行,我一步一步地遵循了本教程,

http://excid3.com/blog/setting-up-ubuntu-12-04-with-ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/#.UUAVdhnZVQI

但是当我加载 nginx 时,我只收到 403 错误。这是我的 namei -om/home/deploy(user)/app

 drwxr-xr-x root   root     /
 drwxr-xr-x deploy www-data home
 drwxr-xr-x deploy www-data deploy
 drwxr-xr-x deploy www-data knowyourroute

然后在我的 nginx.conf 中,我在最上面

用户部署 www-data;

然后在服务器{我有

listen 80;
server_name 10.0.0.30;
root /home/deploy/knowyourroute/public;
passenger_enabled on;

location / {
   root html;
   index index.html index.htm;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

我已经用谷歌搜索了它的废话尝试更改权限,组,以 root 身份运行它或以用户 deploy 运行它但仍然没有我没有任何东西可以尝试如果有人有任何想法都很棒。

最佳答案

您需要在位置 block 中重新指定 passenger_enabled。

关于ruby-on-rails - 尝试将 Passenger/Nginx 用于我的 Rails 生产服务器,出现 403 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15378434/

相关文章:

ruby-on-rails - 在 Heroku 中将 Postgresql 连接到 Rails

ruby-on-rails - ruby rails : Using XML Builder Partials

ruby-on-rails - 如何测试 rails 模型的 after_initialize 回调?

ruby-on-rails - 如何确保该表不包含重复项(基于两个外键)?

ruby-on-rails - ActiveRecord 存在吗?与协会

linux - bash 脚本根据目录名称的模式在目录上递归运行命令

sql - 在 hive 表中导入系统名称、系统当前日期、时间

linux - 错误 : Failed to synchronize cache for repo 'updates'

javascript - Rails 3 Ajax 表单不发送参数

ruby-on-rails - 什么是 MyApp::Application.initialize!打电话?