ruby-on-rails - Rails + Passengen + Nginx 部署,报错 403 Forbidden?

【字号: 日期:2022-07-07浏览:34作者:雯心

问题描述

基本按照教程配置好了,但是访问的时候确实 403 错误,然后查看nginx 日志,错误如下:

2015/03/25 04:34:51 [error] 2269#0: *1 directory index of '/home/rails-deploy/project/' is forbidden, client: xxx.xxx.xxx.xxx, server: example.cn, request: 'GET / HTTP/1.1', host: 'example.cn'

在项目目录中新建以个 index.html 文件之后是可以访问到的,也就证明项目目录的权限是没有问题的。

在rubychina上也看到有人遇到相似的问题,但是并没有实际的解决方案:RubyChina

想问一下有没有人遇到过这种问题并解决了的。

问题解答

回答1:

有完成以下步骤么?rails generate secret key

回答2:

你的这个问题现在解决了吗?

相关文章: