I am trying to deploy a rails 4.1.0 application in my working environment with apache (2.4.17), rvm and passenger (4.0.59).
The problem is that I keep getting the list of Apache directories in the public directory when I go to the URL of my website (www.myapp.com). But: When I go to the route inside my rails application, for example; www.myapp.com/pages/1
the passenger launches the application, and everything works as expected.
This is my passenger .conf:
LoadModule passenger_module /home/sander/.rvm/gems/ruby-2.1.0-preview2/gems/passenger-4.0.59/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/sander/.rvm/gems/ruby-2.1.0-preview2/gems/passenger-4.0.59
PassengerDefaultRuby /home/sander/.rvm/gems/ruby-2.1.0-preview2/wrappers/ruby
</IfModule>
I checked that the apache module was loaded:
>> apache2ctl -M
...
passenger_module (shared)
Virtual host configuration:
<VirtualHost my-ip:80>
ServerName www.myapp.com
ServerAlias myapp.com
DocumentRoot /srv/www/rails/myapp/current/public
PassengerAppRoot /srv/www/rails/myapp/current
RailsEnv production
<Directory /srv/www/rails/myapp/current/public>
Require all granted
Options -MultiViews
</Directory>
</VirtualHost>
Any help is greatly appreciated.
source
share