defaul apache vhost

Catching every request to any unspecified IP address and port, i.e., an address/port combination that is not used for any other virtual host.

Server configuration:

    ...
    <VirtualHost _default_:*>
    DocumentRoot /www/default
    ...
    </VirtualHost>
   

Using such a default vhost with a wildcard port effectively prevents any request going to the main server.
A default vhost never serves a request that was sent to an address/port that is used for name-based vhosts. If the request contained an unknown or no Host: header it is always served from the primary name-based vhost (the vhost for that address/port appearing first in the configuration file).
You can use AliasMatch or RewriteRule to rewrite any request to a single information page (or script).

Добавить комментарий

Ваш e-mail не будет опубликован.