4

So I'm trying to install Passenger on the newest version of KUbuntu (13.10). I installed Apache2 using the apache2-mpm-worker package using the Muon Package Manager. And these are the commands I ran.

rvmsudo gem install passenger
rvmsudo passenger-install-apache2-module

But I keep getting the following errors:

[Fri Oct 18 15:52:13.227790 2013] [core:warn] [pid 13095] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined                        
[Fri Oct 18 15:52:13.227933 2013] [core:warn] [pid 13095] AH00111: Config variable ${APACHE_PID_FILE} is not defined                        
[Fri Oct 18 15:52:13.227969 2013] [core:warn] [pid 13095] AH00111: Config variable ${APACHE_RUN_USER} is not defined                        
[Fri Oct 18 15:52:13.227991 2013] [core:warn] [pid 13095] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined                       
[Fri Oct 18 15:52:13.228026 2013] [core:warn] [pid 13095] AH00111: Config variable ${APACHE_LOG_DIR} is not defined                         
[Fri Oct 18 15:52:13.231737 2013] [core:warn] [pid 13095:tid 3074562624] AH00111: Config variable ${APACHE_RUN_DIR} is not defined          
[Fri Oct 18 15:52:13.232760 2013] [core:warn] [pid 13095:tid 3074562624] AH00111: Config variable ${APACHE_LOG_DIR} is not defined          
[Fri Oct 18 15:52:13.233043 2013] [core:warn] [pid 13095:tid 3074562624] AH00111: Config variable ${APACHE_LOG_DIR} is not defined          
[Fri Oct 18 15:52:13.233078 2013] [core:warn] [pid 13095:tid 3074562624] AH00111: Config variable ${APACHE_LOG_DIR} is not defined          
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:                                                                              
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}                                                                                 

--------------------------------------------                                                                                                

WARNING: Apache doesn't seem to be compiled with the 'prefork', 'worker' or 'event' MPM

Phusion Passenger has only been tested on Apache with the 'prefork', the                                                                    
'worker' and the 'event' MPM. Your Apache installation is compiled with                                                                     
the '' MPM. We recommend you to abort this installer and to recompile                                                                       
Apache with either the 'prefork', the 'worker' or the 'event' MPM.                                                                          

Press Ctrl-C to abort this installer (recommended).
Press Enter if you want to continue with installation anyway.

The result of my running apache2ctl -V is:

Server version: Apache/2.4.6 (Ubuntu)
Server built:   Aug  9 2013 14:31:04
Server's Module Magic Number: 20120211:23
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   32-bit
Server MPM:     worker
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/apache2"
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="mime.types"
 -D SERVER_CONFIG_FILE="apache2.conf"

As can be seen, the server is compiled with the worker MPM, so why is passenger complaining? And how do I solve the above errors (warnings, really, but to be safe, I'd like to not have any warnings)?

Thanks.

tempestfire2002
  • 143
  • 1
  • 3
  • 1
    Passenger complains because it queries `httpd -V` to find out what the MPM is. However, Ubuntu 13.10 changed the way that that command works, and as a result Passenger was unable to correctly detect the MPM. This issue has just been fixed in Passenger: https://github.com/phusion/passenger/commit/6f5af46de7cb80dd88ef3b35c7c5c4bfbfa0cfd3 – Hongli Lai Jan 07 '14 at 23:23

2 Answers2

4

This is due to some missing environment variables. Try to run this first:

$ rvmsudo $SHELL
# source /etc/apache2/envvars
# export HOME=/home/USRNAME

This script sets the missing variables (change USRNAME accordingly).

frasten
  • 56
  • 3
  • Hmm, I tried that, and now passenger tells me: `/home/usrname/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.20/lib/phusion_passenger/platform_info/ruby.rb:202: in 'expand_path': couldn't find HOME environment -- expanding '~' (ArgumentError)` – tempestfire2002 Oct 23 '13 at 07:33
  • I've edited my answer again to address your new issue. – frasten Oct 23 '13 at 09:44
  • 2
    Thanks, that worked! But because I had to run the passenger install with `rvmsudo`, I did a `rvmsudo $SHELL` first to start a sudo shell with rvm loaded. The commands above then worked perfectly to get passenger installed. – tempestfire2002 Oct 24 '13 at 01:33
  • Please edit the answer to mention the RVM from the comment above. For example: rvmsudo bash, then source, then export... – Alex Kaushovik Oct 26 '13 at 04:23
2

I see that you already solved this problem but for other people... Passenger now ships precompiled binaries for last ubuntu distribution, so there's no need to precompile with passenger-install-apache2-module on every upgrade.

I followed this instructions and it worked for me: http://www.modrails.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu

deivid
  • 121
  • 3