Since the last Fusion Passenger update, all my Sinatra applications have stopped working on the following env: Apache (2.4.17), Phusion Passenger (5.0.21). Everything was working as expected before updating the passenger middleware.
The problem is, apache directory is trying to proceed to a listing of the public directory when I'm requesting the url (https://myapp.ch) of my vhost.
The ODD part: If a route defined in the Sinatra controller is requested (i.e: https://myapp.ch/infos), passenger is started and the requested page is served as expected.
Here is the Virtual Host part:
<VirtualHost *:443>
DocumentRoot /home/user1/sinatra/app1/public
ServerName myapp.ch
<Directory /home/user1/sinatra/app1/public>
AllowOverride all
Order allow,deny
Allow from all
Options -MultiViews
Require all granted
</Directory>
Config.ru
# encoding: UTF-8
require 'rubygems'
require 'sinatra'
require File.expand_path '../start.rb', __FILE__
run Sinatra::Application
Apache Log Error when requesting the root of the Sinatra App (/):
[Mon Oct 26 22:10:30.728795 2015] [autoindex:error] [pid 3535:tid 140103510914816] [client 176.127.182.162:50956] AH01276: Cannot serve directory /home/user1/sinatra/app1/public/: No matching DirectoryIndex (none) found, and server-generated directory index forbidden by Options directive
Apache is trying to do directory listing (which has been disabled by configuration).
Has someone experience the same issue ? How to make apache launch passager and serves the root of the Sinatra app ?
Apparently there is a bug in Apache 2.4.17.
Disabling the module auto index (which is the cause of the wrong behaviour, will prevent the error.
Phusion will address the issue in the realase of Passenger 5.0.22 before Apache 2.5.0 will be released.