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...

One Min Read
922 Views

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 https://rvm.io/mpapis.asc | gpg2 --import -
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
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

passenger-install-apache2-module

 

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/mod_passenger.so
<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
</IfModule>
EOF

 

Restart Apache

service httpd restart

 

Check If Passenger is Loaded

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

Exit mobile version