Sinatra and Passenger/mod_rails

Posted on August 13, 2009, under Coding.

If you want Apache to serve up a Sinatra app, your best bet is to use Passenger (AKA mod_rails).

All your app needs is the usual Rackup config file (config.ru) in the app’s root directory, and the directory public/ .

There’s one caveat, though: if you have a file named environment.rb , do not put it in config/ .

If mod_rails finds config/environment.rb , it’ll think your app runs on Rails: