apache virtualhost match rule

1734阅读 0评论2010-08-25 rainbow
分类:系统运维

when a request arrives, the server will first check if it is using an IP address that matches the . If it is, then it will look at each section with a matching IP address and try to find one where the or ServerAlias matches the requested hostname. If it finds one, then it uses the configuration for that server. If no matching virtual host is found, then the first listed virtual host that matches the IP address will be used.

As a consequence, the first listed virtual host is the default virtual host. The DocumentRoot from the main server will never be used when an IP address matches the directive. If you would like to have a special configuration for requests that do not match any particular virtual host, simply put that configuration in a container and list it first in the configuration file.

上一篇:apache access network drive symfony log file
下一篇: lsyncd+rsyncd real-time fs synchronization