I'm trying to clean up my apache vhosts, since I've got a number of 'Alias's in place, and putting them all into a mod_rewrite can be annoying. However, while I can get to specific URLs (such as http://example.dev/robots.txt, http://example.dev/ on its own, the vhost will not fall back to the listed URL (FallbackResource /index.php
).
The vhost is a container for a Zend Framework project, and no .htaccess files are set.
The access log shows .... "GET / HTTP/1.1" 302 0
, but Google Chrome is showing 'No data received' and 'Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.'
Commenting out the FallbackResource
line, and re-enabling the <Location />
-based mod_rewrite works as expected though.
EDIT: There is nothing in the vhost that I can see to stop it from working. A few Alias
lines (which FallbackResource is supposed to work with) and some FilesMatch
to stop access to file with particular extensions. The only thing appearing in the logs is the 404 when it's trying to go to the URL and not to index.php (the listed resource).
<VirtualHost *:80>
ServerAdmin webmaster@site.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/website/current/html/
SetEnv APPLICATION_ENV productionbackend
# must be most specific first
Alias /i/static /var/website/static/i
# more /i/* Alias
Alias /i /var/website/current/resources/common-furniture/
# protecting files in the directory.
<FilesMatch ".*\.xml">
Order allow,deny
Deny from all
</FilesMatch>
<Directory "/var/website/current/html/">
Options FollowSymLinks All
AllowOverride All
</Directory>
ErrorLog logs/error.log
CustomLog logs/access.log common
</VirtualHost>