Login to your server and switch to root (yes, you need root access).
gem install passenger
Here the installer (which is awesome and very user friendly) will tell you if you have all the required components, and if not, it will tell you what you need to do to install them.
I was missing Curl development headers with SSL support.
yum install curl-devel
once that finished, try again:
If you have all of the required components, passenger will compile and you’ll end up with an apache2 module. It tells us to update our apache configuration with these lines… don’t do it yet:
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/ext/apache2/mod_passenger.so
As you may have discovered, WHM really does want to manage all of your apache configuration files for you, and thus if you start messing with them directly they will likely get overwritten the next time you update your server (i.e. with Apache EasyUpdate).
The correct way to add changes to your apache configuration is to add it to /usr/local/apache/conf/includes/pre_virtualhost_global.conf. It might not exist. (Mine had just a few lines we had put in there for PCI compliance, such as “ServerSignature Off”).
Once you have added those three lines to your pre_virtualhost_global.conf file, it’s time to restart apache.
Magically, apache restarted without any errors. If you run into any trouble, go back and comment out the lines in your conf file above and try to restart the service again. If you need help looking at logs, restarting services, etc, check out the WHM docs.
Finally, passenger tells us this:
Deploying a Ruby on Rails application: an example
Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:
DocumentRoot /somewhere/public # <-- be sure to point to 'public'!
AllowOverride all # <-- relax Apache security settings
Options -MultiViews # <-- MultiViews must be turned off
So, how do you add custom directives to your accounts in WHM? Check out the documentation on custom VirtualHost directives.