After an update to Apache 2.4, my Chiliproject (served by Phusion Passenger) instance did not run anymore. The problem was twofold:

Firstly, I used passenger 3.0.19, which is not compatible with Apache 2.4:

apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/passenger.load: Cannot load /home/roland/.rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19/ext/apache2/mod_passenger.so into server: /home/roland/.rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19/ext/apache2/mod_passenger.so: undefined symbol: unixd_config

This happens because Apache 2.4 has changed the symbol unixd_config to ap_unixd_config. The issue can quickly be solved by installing a more recent version of passenger:

gem install passenger –version 4.0.20

Afterwards, we need to cd to ~/.rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0.20  and execute:

./bin/passenger-install-apache2-module

and follow the instructions. You may consider to specify a user and group under which Passenger will run. This is useful, if you have an rvm in your home directory. In my case these lines look like:

PassengerDefaultUser roland
PassengerDefaultGroup www-data

After this, Apache starts again without problems (sudo service apache2 restart), but instead of the web application we see the raw directory contents. This is because the access control mechanism blocks an execution of Passenger.
Open up the sites configuration (default: /etc/apache2/sites-available/www.conf) and add the following line to the <Directory> section that applies to your Chiliproject:

Require all granted

Afterwards, restart Apache once more.

References

  • [1] New API for Apache 2.4