Install Passenger [Mod_Passenger] in Latest Running Version of CentOS Web Panel | Centos 6/7


Passenger is an open source web application server for Ruby. It handles HTTP requests, manages processes and resources, and enables administration, monitoring and problem diagnosis. Passenger is very easy to use, makes deploying in production much easier and is scalable.

Install Ruby

command curl -sSL | gpg2 --import -
curl -L | bash -s stable
source /etc/profile.d/
rvm install 2.5.1


Install Passenger

gem install passenger


Export required Apache Paths

export APXS2=/usr/local/apache/bin/apxs
export APR_CONFIG=/usr/bin/apr-1-config


Install Passenger for Apache



Load Passenger Module in Apache. Copy paste all lines not one by one

cat > /usr/local/apache/conf.d/mod_passenger.conf << "EOF"
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.5.1/gems/passenger-5.3.4/buildout/apache2/
<IfModule mod_passenger.c>
PassengerRoot /usr/local/rvm/gems/ruby-2.5.1/gems/passenger-5.3.4
PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.5.1/wrappers/ruby


Restart Apache

service httpd restart


Check If Passenger is Loaded

/usr/local/apache/bin/httpd -M | grep passenger