[Cialug] Apache default VH configuration

Christopher R. Rhodes arreyder at apache.org
Fri Apr 30 12:07:10 CDT 2010


On 04/30/10 11:03, Josh More wrote:
> When you're doing name-based virtual hosting, the hosts are parsed in alphabetical order.
> 
> Add a "ServerName aaaaaaaaaaaaaaa.no.site.exists" to the default.  See if that gives you the behavior you want.
> 
> 

Incorrect unless we recently changed something.

The virtualhosts are handled in the order that they are defined.  If a requests does not match any ServerName then the
first listed VirtualHost bound to the IP:port will be given the request to process.

Restated, the first listed virtualhost on an address is the default for any request that does not explicitly match a
later defined ServerName.

You might find the output of httpd -S useful  (apache2 -S/apache -S, whatever your distro does to desecrate our sacred
binary name ;)


crr
arreyder at apache.org


More information about the Cialug mailing list