【问题标题】:Passenger + Capistrano + Apache = Rails app not running乘客 + Capistrano + Apache = Rails 应用程序未运行
【发布时间】:2012-08-09 06:06:29
【问题描述】:

我正在尝试使用 capistrano 部署我的 rails 应用程序。

这正是我遇到的问题,只是修复对我不起作用。我在下面粘贴了我的信息。

/var/www/vhosts/example.us/conf/vhost.conf

ServerName example.us
ServerAlias example.us
DocumentRoot /var/www/vhosts/example.us/current/public
PassengerAppRoot /var/www/vhosts/example.us/current

<Directory "/var/www/vhosts/example.us/current/public">
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>

RailsEnv development
RailsBaseURI /httpdocs

我也试过RailsBaseURI /

ls -l from /var/www/vhosts/example.us 在一些重要目录上(不显示权限)

current -> /var/www/vhosts/example.us/releases/20120809050127
httpdocs -> current/public/

有人可以指出导致乘客看不到我的 rails 应用程序的方向吗?

编辑

这似乎与 capistrano 的“当前”符号链接有关。当我通过 ftp 将我的 rails 应用程序移动到服务器,然后将我的 vhost.conf 更改为指向我的项目公用文件夹而不是当前/公用文件夹时,它似乎可以工作。

如果这是根本问题,我该如何解决 capistrano 的符号链接问题?我原以为PassengerAppRoot 会解决这个问题。

编辑

此行出现在错误日志中

[Sun Aug 12 18:02:07 2012] [error] [client 11.1.1.111] Directory index forbidden by Options directive: /var/www/vhosts/example.com/httpdocs/

【问题讨论】:

  • 您确定启用并包含乘客模块吗?如果是,您是否重新启动了服务器?
  • 是的,我已经重新启动了服务器。如何检查乘客模块是否已启用并包含在内?我有另一个正在使用乘客的服务器上运行的项目,如果我输入passenger-status,它会返回一般信息。

标签: ruby-on-rails linux apache capistrano passenger


【解决方案1】:

我好像没跑

/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain xxx.xx.xx.xx

所以 apache 实际上并没有查看我的 vhosts.conf 文件。

【讨论】:

    猜你喜欢
    • 2018-02-13
    • 2011-04-26
    • 1970-01-01
    • 2010-12-14
    • 2016-06-19
    • 1970-01-01
    • 1970-01-01
    • 2013-07-15
    • 1970-01-01
    相关资源
    最近更新 更多