[英]Passenger + Capistrano + Apache = Rails app not running
I'm trying to deploy my rails app with capistrano. 我正在尝试使用capistrano部署我的rails应用程序。
This is exactly the problem i'm experiencing, only the fix isn't working for me. 这正是我遇到的问题,只有修复不适合我。 I've pasted my info below.
我在下面粘贴了我的信息。
/var/www/vhosts/example.us/conf/vhost.conf /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
I've also tried RailsBaseURI /
我也试过
RailsBaseURI /
ls -l from /var/www/vhosts/example.us
on some the important directories (not showing the permissions) 来自
/var/www/vhosts/example.us
ls -l对某些重要目录(不显示权限)
current -> /var/www/vhosts/example.us/releases/20120809050127
httpdocs -> current/public/
Can someone please point me in the direction of what's causing passenger to not see my rails app? 有人可以指出我的方向是什么导致乘客看不到我的rails应用程序?
EDIT 编辑
It seems that it has something to do with capistrano's "current" symlink. 它似乎与capistrano的“当前”符号链接有关。 When i move my rails app to the server via ftp and then change my vhost.conf to point to my projects public folder rather than the current/public folder, it seems to work.
当我通过ftp将我的rails应用程序移动到服务器然后更改我的vhost.conf指向我的项目公用文件夹而不是当前/公共文件夹时,它似乎工作。
How can I resolve the issue with capistrano's symlink if that's the underlying issue? 如果这是潜在的问题,我如何解决capistrano的符号链接问题? I would have thought that the
PassengerAppRoot
would have solved this. 我原以为
PassengerAppRoot
会解决这个问题。
EDIT 编辑
This line appears in the error log 此行显示在错误日志中
[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/
It seems that I hadn't run 好像我没跑
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain xxx.xx.xx.xx
so apache was actually not looking at my vhosts.conf file. 所以apache实际上并没有查看我的vhosts.conf文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.