Determine version of Phusion Passenger on managed server - apache

I'm going to host an app on a managed server.How to show the current version of Phusion Passenger running on that machine?

passenger -v
gem list |grep passenger

Related

Check the version of Apache web server on Suse Linux ES 12

does anyone know how I could check the version of apache2 web server on Linux Suse Enterprise Server 12?
I tried httpd -v and apache2 -v but those options don't work on this version of linux.
I would like to update the apache server, but unfortunately I have not worked with this version of linux until now.
Thanks in advance for your help.
Just check the installed rpm package by
rpm -q -i apache2
and also check the changelog of the package by
rpm -q --changelog apache2
because current security fixes are backported to the originally released version.

How do I reinstall Apache 2.2 on Ubuntu 13.10?

I have a VPS running Ubuntu 13.10 and Apache which I use to host Rails sites.
Yesterday I decided to do a release upgrade before applying a shellshock patch $do-release-upgrade. The upgrade failed with a broken pipe error (I should have made a note of the exact error but didn't — sorry). I logged back in and the Ubuntu version remains the same. I noticed that Apache didn't restart so tried to start it up myself $ sudo /etc/init.d/apache2 start but I'm getting an error:
* Starting web server apache2
apache2: Syntax error on line 16 of /etc/apache2/apache2.conf: Cannot load
/home/simon/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.19/buildout/apache2/mod_passenger.so
into server: /home/simon/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.19/buildout/apache2/mod_passenger.so:
undefined symbol: unixd_config
Action 'start' failed.
I've read that this type of error can happen when upgrading from Apache 2.2 - 2.4. I'm not 100% what version I was on before (or if it even upgraded yesterday — I'm assuming it did but feel free to tell me if I'm making stupid assumptions) but currently Server version: Apache/2.4.6 (Ubuntu) is installed.
Is there a way for me to re-install Apache 2.2? (Is this even likely to rectify my issue or is there a better solution that I should try out?)
The cause of your problem isn't Apache. It's Phusion Passenger. You installed Phusion Passenger against an older Apache version. Then you upgraded your OS, which upgraded Apache too, so that broke Phusion Passenger and now Apache refuses to start.
The solution: reinstall Phusion Passenger, so that it is recompiled against your current Apache version. Don't reinstall Apache; that doesn't help.

Passenger using Ruby system version instead of Ruby from RVM

I'm using RVM (1.19), Passenger (3.0.19), Apache on a Debian environment.
I tried update the ruby version from 1.8.7 to 1.9.3 using RVM. The following steps were executed:
rvm install 1.9.3
rvm rvmrc to .ruby-version (in my Rails app folder)
rvm use 1.9.3 & gem install passenger & rvm passenger-install-apache2-module (to install passenger and apache2-module in my 1.9.3 environment)
updated 'mod_rails.load' file in '/etc/apache2/mods-available/':
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
And finally, I restarted the apache server.
After all, my application is still using Ruby 1.8.7 and Passenger is getting gems from '/var/lib/gems/1.8/gems/'. So I guess Passenger is ignoring the configuration in mod_rails.load.
Does anyone know how resolve this problem?
what does ruby -v output?
if it is 1.8.7 try rvm use 1.9.3 and be sure that 1.9.3 is set as the default.
rvm default 1.9.3
and that your .rvmrc is sourced in your .bash_profile something like:
`[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"`
also what does which rvm return? that should be the start of file path you use to load gems from. its normally something like /Users/local/.rvm

Passenger crashes, hangs at apache start

On a fresh installation of Ubuntu, with Ruby/Rails/RVM with Apache via Passenger, apache will come up on a clean reboot, but crash at the first request to the Rails app.
I have done all of this many times before ... except RVM installed in multi-user mode.
It seems like maybe there's some library conflict?
Details below.
64-bit Ubuntu 11.10 installation
created a release user, and group
uninstall the default apache, ruby, passenger (sudo apt-get remove ...)
installed RVM using the system version (multiple users)
installed ruby 1.9.3p194 using RVM (installed as the release user)
add release user to group rvm
ruby and gems are under /usr/local/rvm/ and are all in group rvm and readable
install apache2 and various supporting libraries (sudo apt-get install apache2)
add apache2 user (www-data) to group rvm
install passenger from gem (gem install passenger)
use passenger to make passenger module (passenger-install-apache2-module). No errors.
configure apache to load the correct module (under /usr/local/rvm...)
configure apache to reference the correct PassengerRoot and PassengerRuby
note: this is all without any reference to the Rails app
start apache (sudo apache2ctl start) ... this hangs
Apache error.log shows
[ pid=1303 thr=140033289561952 file=ext/apache2/Hooks.cpp:1389 time=2012-05-07 19:54:15.497 ]: Initializing Phusion Passenger...
[ pid=1303 thr=140033289561952 file=ext/apache2/Hooks.cpp:1664 time=2012-05-07 19:54:15.536 ]: Shutting down Phusion Passenger...
[ pid=1312 thr=140533444790112 file=ext/common/LoggingAgent/Main.cpp:283 time=2012-05-07 19:54:15.537 ]: Logging agent online, listening at unix:/tmp/passenger.1.0.1303/generation-0/logging.socket
In other words, passenger terminates moments after it starts. /var/log/syslog shows a stack dump for PassengerWatchd.
I tried running passenger in standalone mode. Nada.
Any ideas?
For anyone looking, this ended up being an issue for several people, and there are several good workarounds posted on the Passenger Google Group here
Make sure your passenger.conf is using the same version of ruby as in your console.
$ cat /etc/apache2/mods-available/passenger.conf
PassengerRuby /home/ubuntu/.rvm/rubies/ruby-1.9.2-p320/bin/ruby
PassengerRoot /home/ubuntu/.rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.18
PassengerDefaultUser www-data
Compare the PassengerRuby is the same as:
$ which ruby
/home/ubuntu/.rvm/rubies/ruby-1.9.2-p320/bin/ruby

Passenger+Apache2+RubyonRails installation fail

Now I'm trying to install Passenger for RoR on Ubuntu 11.04. I already have apache2 and RoR, also I installed passenger gems. But when I continue with this command:
sudo passenger-install-apache2-module
it says that he can't find this command.
By the way, command 'passenger' he also don't know.
Depending on how you installed the passenger gem the passenger-install-apache2-module file could be in a few different places.
If you are using the default 1.8.7 ruby installation on Ubuntu it should be in here...
/usr/local/lib/ruby/gems/1.8/gems/
In there you should find a passenger folder with the version you installed, example...
/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.5
Within that folder there should be a bin/ directory, and within there is passenger-install-apache2-module
Failing that, make sure you installed the gem with sudo and try again.