dongxie45083 2013-12-02 02:31
浏览 44
已采纳

非Ruby / Rack网站抛出乘客错误#2

I have Rails and non-rails sites mixed together on a slice at Rackspace. It's running CentOS 6.3 and packages are managed with yum.

A php site is running under a user account (/home/chad) different than most of the sites running on the server (which are coming from /var/www). Sites in /var/www render fine. The error is:

Passenger error #2

An error occurred while trying to access '/home/chad/sdb/config.ru': Cannot stat '/home/chad/sdb/config.ru': Permission denied (errno=13)
Apache doesn't have read permissions to that file. Please fix the relevant file permissions.

This should not be intercepted nor served via Passenger at all. Following the solution in this thread (Ruby error on non-ruby site) I end up with the Apache Server Test Page instead of the Passenger Error.

The httpd.conf entry for this virtual host:

<VirtualHost *:80>
  ServerName stardustbakery.com
  ServerAlias www.stardustbakery.com
  ServerAdmin ****@******.***
  DocumentRoot "/home/chad/sdb/public_html"
  CustomLog /var/log/httpd/stardustbakery.com-access_log combined
  ErrorLog /var/log/httpd/stardustbakery.com-error_log
  PassengerEnabled off
</VirtualHost>

I've also tried manually setting the IP for all virtual hosts and I've upgraded Passenger from 4.0.14 to 4.0.26.

Apache is version 2.2.15. PHP is 5.3.3. Ruby is 1.9.3

  • 写回答

1条回答 默认 最新

  • dongrou839975 2013-12-03 17:15
    关注

    For what it's worth, the issue appeared to be the perms on /home/chad. Adding chad and apache to the same group and then giving the group permissions on /home/chad worked.

    Likewise, we could have put the sites in a folder that was owned by that group outside of /home/chad as well, but that would have caused more logistical problems.

    If there's a better solution, I'd love to hear it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示