【问题标题】:Phusion Passenger Forbidden Permissions DeniedPhusion 乘客禁止许可被拒绝
【发布时间】:2012-11-29 08:16:12
【问题描述】:

我正在尝试使用 Apache 运行 Phusion Passenger,当我启动乘客时,我收到以下错误:

=============== Phusion Passenger Standalone web server started ===============
PID file: /root/passenger.3000.pid
Log file: /root/passenger.3000.log
Environment: development
Accessible via: http://0.0.0.0:3000/

You can stop Phusion Passenger Standalone by pressing Ctrl-C.
===============================================================================
    2012/12/11 18:01:36 [error] 3188#0: *4 "/root/public/index.html" is forbidden (1
3: Permission denied), client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", host: "0.0.0.0"

我已经环顾了其他人的 cmets,但他们的答案集中在 Nginx 而不是 Apache。任何建议将不胜感激。

【问题讨论】:

  • /root/public/index.html 的权限?
  • 它正在尝试访问 index.html 但该文件在公共目录中不存在。
  • 那肯定会解释它 ;-) 您可以在您的 routes.rb 中为 root 定义一个路由,这样它就不会尝试访问默认的 index.html。它看起来像这样:root :to => "welcome#index"
  • 您的应用程序根在哪里?它应该是 /root 吗?

标签: passenger redmine phusion


【解决方案1】:

出于安全原因,Phusion Passenger Standalone 将拒绝以 root 身份运行。当您运行passenger start 时,它要求您提供--user,不是吗?好吧,Phusion Passenger Standalone 正在以该用户身份运行,并且该用户可能无权访问 /root 下的任何内容。

您可以放松对 /root 的权限,也可以将应用程序目录移动到该用户可以访问的位置。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-12-11
    • 2015-12-21
    • 1970-01-01
    • 1970-01-01
    • 2012-07-24
    • 1970-01-01
    • 2017-06-12
    • 1970-01-01
    相关资源
    最近更新 更多