Passenger Phusion not working on Apache

UPDATE: when I enter “statistics on passenger memory” I show:

---Passenger processes--- Processes: 0 

How to fix this problem? Why the passenger did not start, although I added it to httpd.conf and restarted apache?

I'm having trouble running Phusion Passenger to run Ruby on Rails on the server. I followed all the instructions on the Phusion website and installed the passenger, and also modified and created Apache VirtualHost to point to the new directory and make sure all .conf files load successfully. Also loaded httpd -M passenger_module. I also successfully completed the Passenger Standalone and Rails Server commands on the local host and was able to verify that it works with curl.

But when I try to run my domain from a browser, I just get a 404 not found or empty index file that I create in this folder specified in DocumentRoot under VirtualHost (so I know that it loads .conf and goes into the correct directory), but it doesn’t load the Rails application ... Can someone please indicate what I am doing wrong? Here are my settings and config:

 ruby -v: ruby 2.1.2p95 rails -v: Rails 4.2.3 passenger -v: Phusion Passenger version 5.0.15 httpd -v: Apache/2.2.27 (Unix) opearting system: CentOS uname -i: x86_64 

httpd.conf:

 Include "/usr/local/apache/conf/includes/mydomain.conf" LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-5.0.15/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-5.0.15 PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.1.2/wrappers/ruby </IfModule> 

/usr/local/apache/conf/includes/mydomain.conf:

 <VirtualHost 208.79.235.241:80> ServerName mydomain.com DocumentRoot /home/clevert/public_html/rails_apps/mydomain.com/public PassengerRuby /usr/local/rvm/gems/ruby-2.1.2/wrappers/ruby <Directory /home/clevert/public_html/rails_apps/mydomain.com/public> Allow from all Options -MultiViews </Directory> </VirtualHost> 

passenger-config about ruby ​​command:

 Command: /usr/local/rvm/gems/ruby-2.1.2/wrappers/ruby 

Passwords-config validate-install:

 Checking whether this Passenger install is in PATH... ✓ Checking whether there are no other Passenger installations... ✓ Checking whether Apache is installed... ✓ Checking whether the Passenger module is correctly configured in Apache... ✓ Everything looks good. :-) 
+6
source share
2 answers

So, after a couple of weeks of frustrations / hobbies trying to fix this, I have a solution, and I really hope this helps someone who is struggling with this!

PROBLEM: I had both apache and litespeed installed on my server, and that was the only culprit! I completely disabled litespeed and switched to apache (you can easily switch between them using the WHM control panel) and run the passenger memory statistics again, and it all started! Passenger cars magically appeared in the processes, and then the application appeared in the memory statistics when I downloaded the application!

+2
source

It looks like you did not specify your PassengerAppRoot directive.

I work successfully on my Ubuntu 14.04 machines. I have a few more directives in my /etc/apache2/sites-enabled/app.example.com.conf file. I don’t know if they are needed for CentOS, but they are needed to work on Ubuntu.

In addition, I use rbenv instead of rvm , and I deploy through Capistrano as deployer on the server.

Here are the relevant parts of my app.example.com.conf file:

  DocumentRoot /srv/http/app.example.com/current/public <Directory /srv/http/app.example.com/current/public> Order allow,deny Allow from all Require all granted </Directory> PassengerRuby /home/deployer/.rbenv/shims/ruby PassengerAppType rack PassengerAppRoot /srv/http/app.example.com/current PassengerStartupFile config.ru PassengerRestartDir /srv/http/app.example.com/current/tmp PassengerDebugLogFile /srv/http/app.example.com/shared/log/passenger.log # 0 = warn; 1 to 3, increasing levels of debugging information PassengerLogLevel 1 
+2
source

All Articles