Trying to configure Snorby(ruby app) to work with Apache/2.4.12 and Passenger 5.0.10.

-- I've successfully installed from homebrew apache and passenger.

brew install httpd24 passenger

-- Created /etc/apache/other/passenger.conf (as instructed in Homebrew):

LoadModule passenger_module /usr/local/opt/passenger/libexec/buildout/apache2/mod_passenger.so
    PassengerRoot /usr/local/opt/passenger/libexec/lib/phusion_passenger/locations.ini
    PassengerDefaultRuby /usr/local/var/rbenv/versions/1.9.3-p551/bin/ruby

-- Enabled virtual hosts module in /usr/local/etc/apache2/2.4/httpd.conf:

# Virtual hosts
Include /usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf


LoadModule vhost_alias_module libexec/mod_vhost_alias.so

-- Created Virtual host in /usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf:

<VirtualHost *:8080>
        ServerAdmin Andryuwka@localhost
        ServerName snorby.server.loc
        ServerAlias www.snorby.server.loc
        DocumentRoot /usr/local/var/www/snorby/public
        <Directory "/usr/local/var/www/snorby/public">
                Options Indexes FollowSymLinks Includes ExecCGI
                AllowOverride all
                Order deny,allow
                Allow from all
                #Require all granted
                Options -MultiViews

-- added snorby.server.loc www.snorby.server.loc to /etc/hosts

-- restarted httpd with apachectl restart

but when navigating www.snorby.server.loc in browser instead of running rails-driven application (Snorby login page and dashboards) getting just the files content of /usr/local/var/www/snorby/public:

Index of /


Should be something like in this post (scroll down):https://www.corelan.be/index.php/2011/02/27/cheat-sheet-installing-snorby-2-2-with-apache2-and-suricata-with-barnyard2-on-ubuntu-10-x/

So I assume passenger doesn't work with apache properly and doesn't start the application(correct me if I'm wrong). What am I doing wrong? apachectl -M | sort gives me this(nothing with "passenger"):

access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
core_module (static)
dir_module (shared)
env_module (shared)
filter_module (shared)
headers_module (shared)
http_module (static)
log_config_module (shared)
mime_module (shared)
mpm_prefork_module (static)
php5_module (shared)
reqtimeout_module (shared)
setenvif_module (shared)
so_module (static)
status_module (shared)
unixd_module (shared)
version_module (shared)
vhost_alias_module (shared)
Loaded Modules:

Though homebrew claims that their apache already configured for work with passenger, I'm wondering if there is any way to check it?


The PassengerRoot pointing to an .ini file doesn't appear to make sense, it's supposed to be a directory. See the documentation at https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerRoot

  • Changed to PassengerRoot /usr/local/opt/passenger/libexec/lib/phusion_passenger/, restarted apache - doesn't make any difference, Also tried PassengerRoot /usr/local/opt/passenger/ - no luck ((( – Drew Jun 14 '15 at 18:21
  • Okay, but none of those directories are (within) your virtual host DocumentRoot, nor are they Alias'ed in. Try doing that. – Josip Rodin Jun 14 '15 at 19:14
  • How to do this? Well I've changed virtual host DocumentRoot to this: DocumentRoot /usr/local/opt/passenger/libexec/lib/phusion_passenger/locations.ini and it broken my virtual host so now I'm getting this in browser: Not Found The requested URL / was not found on this server. – Drew Jun 14 '15 at 19:18
  • @Andrew again, the part after DocumentRoot cannot be a file, it has to be a directory. Make them both the same directory at that? – Josip Rodin Jun 15 '15 at 14:36
  • Oh sorry it was a typo. I meant I've done this: changed virtual host DocumentRoot to this: DocumentRoot /usr/local/opt/passenger/libexec/lib/phusion_passenger and it didn't help. – Drew Jun 15 '15 at 18:03

Finally the guy from Homebrew project on github pointed me in the right direction. For some reason my /usr/local/etc/apache2/2.4/httpd.conf which was created with Homebrew httpd24 installation doesn't have this line: Include /usr/local/etc/apache2/2.4/other/*.conf(though homebrew claims they should have it - I think it was relatively recent change)

That's why my didn't have passenger module included when checking apachectl -M | sort. (for example: In default /etc/apache2/httpd.conf there is Include /private/etc/apache2/other/*.conf)

So I've added Include /usr/local/etc/apache2/2.4/other/*.conf to my my /usr/local/etc/apache2/2.4/httpd.conf and it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.