FallbackResource directive works for any URI except `/`
I am using a FallbackResource
directive to implement a front controller. Apache should redirect all requests to index.php
in the document root, unless there is a file at the requested URI. This is exactly what it does, unless the request URI is /
; then I get a 324 No Data Received error. Even with LogLevel debug
, nothing is logged when this error happens.
I am using Apache 2.2.22 on Ubuntu for local development, with mod_dir enabled.
I just wanted to check if anyone can see a problem here, before I go and compile the latest Apache 2.2 and file a bug report.
Virtualhost config:
<VirtualHost *:80>
DocumentRoot /var/sites/scms/www
ServerName scms.local
ServerAlias www.scms.local
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/sites/scms/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
Order allow,deny
allow from all
FallbackResource /index.php
</Directory>
<Directory /var/sites/scms/www/resources/>
FallbackResource disabled
</Directory>
ErrorLog /var/sites/scms/log/error.log
CustomLog /var/sites/scms/log/access.log combined
LogLevel debug
</VirtualHost>
Solution 1:
I experienced same problem, so it is probably a bug. However, I managed to solve it using "DirectoryIndex" directive:
DirectoryIndex /index.php
FallbackResource /index.php