简体   繁体   English

Passenger + Capistrano + Apache = Rails应用程序未运行

[英]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.

相关问题 乘客似乎没有在奔跑(Capistrano / Rails / Apache / Ubuntu) - Passenger doesn't seem to be running (Capistrano/Rails/Apache/Ubuntu) 使用capistrano,passenger和apache部署rails - Deploying rails with capistrano, passenger and apache 使用乘客从 Apache 上的子目录运行 rails 应用程序 - Running rails app from a subDir on Apache with Passenger 在 capistrano 部署到乘客 / Apache 环境后,Rails5 应用程序丢失 session,在 Rails 4 上工作正常 - Rails5 app loses session after capistrano deploy to Passenger / Apache env, works fine on Rails 4 Rails Passenger / Capistrano / ubuntu应用不提供资产 - Rails Passenger/Capistrano/ubuntu App not serving assets Rails应用程序与乘客和capistrano挑选错误的宝石 - Rails app with passenger and capistrano picking wrong gemset Rails Ubuntu / passenger / capistrano应用程序资产未部署 - Rails Ubuntu/passenger/capistrano app assets not deploying Nginx / Passenger / Capistrano上的Rails应用程序:资产不起作用 - Rails app on Nginx/Passenger/Capistrano: assets not working Capistrano + NGINX Passenger重启Rails应用程序 - Capistrano + NGINX Passenger Restart Rails App Passenger,Nginx和Capistrano - 乘客根本没有启动Rails应用程序 - Passenger, Nginx, and Capistrano - Passenger not launching Rails app at all
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM