5. Edit /etc/conf.d/apache and add “-D PASSENGER” to apache options

Now just drop a similar vhost config file inside /etc/apache/vhosts.d/

This is a sample vhost file for a rails app.

<VirtualHost *:80>
ServerName mydomain.com
DocumentRoot /myapp/public
Include /etc/apache2/vhosts.d/deflate.conf
RailsBaseURI /
# The maximum number of Ruby on Rails application instances that may be simultaneously active.
# A larger number results in higher memory usage, but improved ability to handle concurrent HTTP clients.
# normally 1 to 10. (1 for each 50mb ram)
RailsMaxPoolSize 1
# The maximum number of seconds that a Ruby on Rails application instance may be idle.
# That is, if an application instance hasn't done anything after the given number of seconds,
# then it will be shutdown in order to conserve memory. ( 1 hour)
RailsPoolIdleTime 3600
RailsEnv 'production'
<Directory /myapp/public>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>