Issue with Passenger - Apache

£可爱£侵袭症+ 提交于 2020-01-01 12:25:12

问题


Running in a Linode slice with Ubuntu 10.04 LTS. I am getting a 500 Internal Server Error.

The Apache log has:

Apache/2.2.14 (Ubuntu) Phusion_Passenger/2.2.7 configured -- resuming normal operations

caught SIGTERM, shutting down

* Passenger could not be initialized because of this error: The Passenger spawn server script, '/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/passenger-spawn-server', does not exist. Please check whether the 'PassengerRoot' option is specified correctly.

But when we run: sudo passenger-install-apache2-module. Passenger does not complain.

On restart we get: sudo /etc/init.d/apache2 restart * Restarting web server apache2 [Sat Oct 23 23:58:30 2010] [warn] module passenger_module is already loaded, skipping ... waiting [Sat Oct 23 23:58:31 2010] [warn] module passenger_module is already loaded, skipping ...done.

Any ideas?

Thanks in advance!


回答1:


Try (re)installing the native apache module (after installing the gem)

apt-get install libapache2-mod-passenger

I think I had the same problem and it worked after that.

Good luck!




回答2:


I solved this previously using:

sudo a2dismod passenger
sudo /etc/init.d/apache2 restart



回答3:


Sounds like your config file is out of whack. Did you run the instructions that follow the install? It looks like it's complaining that you didn't add the PassengerRoot directive to your apache config. The passenger install requires you to add a few lines to your Apache config file manually. On a ubuntu install this is the apache.conf file: /etc/apache2/apache2.conf

Make sure you add the lines

LoadModule passenger_module /home/[username]/.rvm/gems/ruby-1.9.2-p0/gems/passenger-3.0.0/ext/apache2/mod_passenger.so
PassengerRoot /home/[username]/.rvm/gems/ruby-1.9.2-p0/gems/passenger-3.0.0
PassengerRuby /home/[username]/.rvm/wrappers/ruby-1.9.2-p0/ruby

This assumes you are using RVM. If not, the printout and the end of the install will give you the correct path.



来源:https://stackoverflow.com/questions/4006666/issue-with-passenger-apache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!