A Rails application deployed with Passenger simply displays the index of the public directory of the application

I am trying to deploy a Rails application on Ubuntu 9.04 using Passenger.

As far as I can see, everything is set up correctly; however, when I point my browser to my domain, all I see is the index of the application’s public directory.

My guess is that the Passenger does not start - at the bottom of just-plain-folks.co.uk there is no link to the Passenger at all. There is nothing interesting in the log files.

This is my configuration:

/etc/apache2/mods-enabled/passenger.conf

<IfModule passenger_module>
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9
   PassengerRuby /usr/bin/ruby1.8
</IfModule>

/etc/apache2/mods-enabled/passenger.load

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/ext/apache2/mod_passenger.so

/etc/apache2/sites-enabled/just-plain-folks.co.uk

<VirtualHost *:80>
    ServerAdmin admin@just-plain-folks.co.uk
    ServerName just-plain-folks.co.uk
    ServerAlias www.just-plain-folks.co.uk
    DocumentRoot /srv/www/just-plain-folks.co.uk/public_html/
    ErrorLog /srv/www/just-plain-folks.co.uk/logs/error.log
    CustomLog /srv/www/just-plain-folks.co.uk/logs/access.log combined
</VirtualHost>

/srv/www/just-plain-folks.co.uk/public_html/ is a link to the shared directory of my application


If there is anything else that might be helpful in diagnosing this, let me know. Any help is much appreciated!

+3
3

. , , .

symlink , , rails_root /srv/www/just-plain-folks.co.uk/.

+3

(: , docroot)

MultiViews

<VirtualHost *:80>

  ...

  <Directory /srv/www/just-plain-folks.co.uk/public_html>
      Allow from all
      Options -MultiViews
  </Directory>

</VirtualHost>
0

, Sinatra, Phusion Passenger Apache. - , .

, .

  • apache conf /home/me/projects/fantasy-app/somewhere/nested/public /home/me/projects/fantasy-app/public DocumentRoot <Directory>.
  • In mine app.rb, to which I belonged onfig.ru, I had the following:

    set :public_folder, 'build/development/public'
    set :views, Proc.new { File.join(root, "build/development/views") }
    
0
source

Source: https://habr.com/ru/post/1729124/


All Articles