I've been trying for days to get a rails app to run under Passenger on Bluehost, but with no luck. Going to my subdomain where I'm hoping this will run, I'm only getting a directory listing with cgi-bin and public subdirectories. No execution of the rails app.
httpd.conf includes:
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.6/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.6
PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.2.1/wrappers/ruby
</IfModule>
and
<VirtualHost 162.144.138.43:80>
ServerName secure.xxxxx.com
ServerAlias www.secure.xxxxx.com
DocumentRoot /home/diamoou1/public_html/securefinance
ServerAdmin webmaster@secure.xxxxx.com
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/secure.xxxxx.com combined
CustomLog /usr/local/apache/domlogs/secure.xxxxx.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User diamoou1 # Needed for Cpanel::ApacheConf
UserDir enabled diamoou1
<IfModule mod_suphp.c>
suPHP_UserGroup diamoou1 diamoou1
</IfModule>
<IfModule !mod_disable_suexec.c>
<IfModule !mod_ruid2.c>
SuexecUserGroup diamoou1 diamoou1
</IfModule>
</IfModule>
<IfModule mod_ruid2.c>
RUidGid diamoou1 diamoou1
</IfModule>
ScriptAlias /cgi-bin/ /home/diamoou1/public_html/securefinance/cgi-bin/
<Directory /home/diamoou1/public_html/securefinance>
Options -MultiViews
AllowOverride All
</Directory>
</VirtualHost>
In /home/diamoou1/public_html/securefinance/public I have the .htaccess file:
<IfModule mod_passenger.c>
Allow from all
Order Deny,Allow
Options +FollowSymLinks -SymLinksIfOwnerMatch -MultiViews
PassengerResolveSymlinksInDocumentRoot on
#Set this to whatever environment you'll be running in
RailsEnv production
RackBaseURI /
SetEnv GEM_HOME /home/diamoou1/ruby/gems
</IfModule>
Temporarily putting a bad line in the .htaccess file will give the expected error in the log, so apparently apache is reading the .htaccess file.
I suspect the problem might be in RackBaseURI. I installed Passenger as root. RackBaseURI resolves to /root and there is a /root/public_html directory, although apache is serving up the /home/diamoou1/public_html/securefinance directory (where the rails app actually resides). I don't know how to change that variable or it that's really the problem. PassengerBaseURI is the same.
What do I do to fix this?????