HTTP 500 using FallbackResource configuration and bulk vhost

Context

I have Apache 2.2.15 configured for mass shared hosting as follows:

<VirtualHost *:80>
    # ...irrelevant lines omitted
    VirtualDocumentRoot /srv/www/%-3+
    ServerName example.com
    ServerAlias localhost
</VirtualHost>

mkdir /srv/www/fooavailable foo.example.com.


Problem

HTTP 500 of all foo.example.com, when a .htaccess, containing the directive only a FallbackResource, is in the root vhost document. Commenting FallbackResourceremoves the error, but I want to use FallbackResource.


Material checked

I have confirmed that the corresponding module is loaded using httpd -M | grep dir_module. Oddly enough, I still see Invalid command 'FallbackResource', perhaps misspelled or defined by a module not included in the server configurationerrors in the log.

The file system is as simple as possible. There is only "Hello, World" index.phpand .htaccess. Yes, permissions are right.

/srv/www
    foo
        index.php <- 775, owned by apache
        .htaccess <- 664, owned by apache

.htaccess:

  • FallbackResource index.php
  • FallbackResource /index.php
  • FallbackResource foo/index.php
  • FallbackResource /foo/index.php

<Directory /srv/www/foo>, .

  • AllowOverride Indexes AllowOverride not allowed here <VirtualHost>.
  • LoadModule dir_module modules/mod_dir.so httpd.conf

- /, ?

+4
2

FallbackResource 2.2.16, . Apache .

+7

FallbackResource htaccess, Indexes. . mod_dir. vhost:

AllowOverride Indexes

apache, , 500.

+1

All Articles