In reading every thread about this error that Google can find, I know
that the Apache error_log entry "Cannot resolve possible symlink ..."
coupled with a Phusion crash when accessing a Rails app via a
symlinked sub-URI is most likely an issue with how I've set up my
symlink, except that I've tried just about every permutation of
setting up the symlink now to no avail.
In particular, I think I have carefully followed the instructions from
Andrew Hodgkinson in the "OS X 10.6.2's Apache crashes when servicing
a request with Passenger" thread from Nov 18, 2009 (relevant text from
Andrew included at bottom).
Details:
CentOS
Apache 2.2.14
Relevant Apache conf entries:
LoadModule passenger_module /opt/ruby-enterprise/lib/ruby/gems/1.8/
gems/passenger-2.2.15/ext/apache2/mod_passenger.so
PassengerRoot /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/
passenger-2.2.15
PassengerRuby /opt/ruby-enterprise/bin/ruby
<VirtualHost *:80>
ServerName
mysite.com
DocumentRoot /www/
mysite.com/docroot
<Directory "/www/
mysite.com/docroot">
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
RailsEnv production
RailsBaseURI /redmine
<Directory "/www/
mysite.com/docroot/redmine">
AllowOverride all
Options FollowSymLinks -MultiViews
</Directory>
</VirtualHost>
$ cd /www/
mysite.com/docroot
$ ll redmine
lrwxrwxrwx 1 root root 19 Sep 22 12:58 redmine -> /opt/redmine/public
Relevant Apache Error Log entries:
terminate called after throwing an instance of
'Passenger::FileSystemException'
what(): Cannot resolve possible symlink '/www/
mysite.com/docroot/
redmine': No such file or directory (2)
terminate called after throwing an instance of
'Passenger::FileSystemException'
what(): Cannot resolve possible symlink '/www/
mysite.com/docroot/
redmine': No such file or directory (2)
[Wed Sep 22 12:59:32 2010] [notice] child pid 13216 exit signal
Aborted (6)
[Wed Sep 22 12:59:32 2010] [notice] child pid 13217 exit signal
Aborted (6)
The instructions I've followed, from Andrew's Nov 18, 2009 "OS X
10.6.2's Apache crashes when servicing a request with Passenger"
message:
For deploying in a sub-URI of "/myapp" I would need to have a symlink
somewhere that pointed to ".../myapp/public" in the local filesystem
and
set DocumentRoot to the directory in which this symlink resides; then
add
a RailsBaseURI of "/myapp". For example:
<VirtualHost *:80>
ServerName trackrecord.local
DocumentRoot "/path/to/folder/containing/symlink"
<Directory "/path/to/folder/containing/symlink">
Allow from all
</Directory>
RailsEnv development
RailsBaseUri "/name_of_symlink"
<Directory "/path/to/folder/containing/symlink/name_of_symlink">
Options -MultiViews
</Directory>
</VirtualHost>