Reload

Is that it?

Yup. It really is that simple to serve Ruby on Rails applications with passenger (mod_rails).

Additional Rails apps can be configured in the same way — create a vhost and it's done.

Note: you may have noticed that we didn't even need to do anything special with regards to permissions here, as passenger will automatically run the application as the user who owns directory that the virtual host points to. In my case, the 'public_html' directory is in the 'demo' users home directory, as such, my application is being run as the 'demo' user. Which is a good thing. We don't want it to be running as root.

Changes to the application

Whenever you deploy changes to your application all you need to do to is:

touch /home/demo/public_html/testapp/tmp/restart.txt

That will enable the new content to be served — the command can be used in Capistrano or any script you use to deploy your applications.

Summary

Phusion's passenger (mod_rails) is easy to install and even easier to use.

There are no ports or proxies or any other complicated configurations — passenger offers a great deal to the Ruby on Rails community.

—

Ben B

Article Comments:

Many thanks for article! Has stayed with a problem of binding Ruby On Rails to web-server Apache 3 days, and now, having proceeded on specified, to algorithm, all has turned out.
Only at last I would like to add something as without this thing for me did not work. The matter is that, probably, it is required to establish the rights to record to a folder and the enclosed subdirectories where there is our rails-appendix.