Is there anything special related to deploying a Rails application in Ubuntu using Passenger and Apache2?

I've installed passenger appropriately as indicated in the many instruction pages, but every time I add a new element within my sites-available directory (and subsequently a2ensite the file), I have no response at all. In addition, passenger-status reports nothing.

<Virtualhost *:80>
   DocumentRoot  /var/www/html/mynewapp/public
   <Directory /var/www/html/mynewapp/public>
      Allow from all
      Options -Multiviews

The webserver on which I must deploy the (sample) application is used purely for internal purposes, and has only a local IP addres (hence no domain crap, and why I have excluded the Servername directive). Strange thing is that I don't even get an error in the apache error_log.

Any ideas?


I figured this out myself; turned out it was not the apache configuration file, but rather that the application was not being registered with passenger.

To bypass this, I simply set the virtualhost to listen to a specific port (say, 123), and then updated the apache conf to listen on that port. At that point, passenger-status reported the application in the pool.


passenger via apache with the passenger module is what you want to do ?

The only way i know of is via libapache2-mod-passenger

I just post my conf, in my case for diaspora app. ( afaik a server name is needed in a virtual host, at least it is its distinction from the other vhosts!?)

<VirtualHost *:80>
    DocumentRoot "/var/www/diaspora/public"
    ServerName diaspora
        PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.7
        PassengerRuby /usr/bin/ruby1.8
    #ProxyPass / http://localhost:3000/

    Options +ExecCGI
    Options Indexes
    Options +FollowSymLinks

<Directory "/var/www/diaspora">
    Order allow,deny
    allow from all
    AllowOverride All

<Directory "/var/www/diaspora/public">
    Order allow,deny
    allow from all
        Options -MultiViews
  • So if you were to access the webserver hosting this application by IP, what URL would you use in your browser? – panagioti Dec 16 '11 at 18:53
  • The reason I ask is because prior to posting my question, I was able to access the directory of a FRESHLY made rails application from a browser as: Yet, this dumped me into a directory index rather to the index page itself. Subsequently accessing the public/ folder resulted in the typical rails 'Welcome aboard' page. This, however, seemed little more than a static page since clicking the link "About your application’s environment", resulted in the error: Not Found The requested URL /mynewapp/public/rails/info/properties was not found on this server. – panagioti Dec 16 '11 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.