ServerName server.domain.com
ServerAlias server server2.domain.com server2
ServerAlias *.example.com
UseCanonicalName Off
# ...
1) the node is parsed into server_rec structure. Namely:
* ServerName becomes server_rec.server_hostname
* ServerAlias'es in which ap_is_matchexp() finds either '*' or '?' symbol become server_rec.wild_names
* other ServerAlias'es become server_rec.names
2) the ServerName/ServerAlias matching is done versus Host received from HTTP request following these rules:
* byte-by-byte comparison of Host and server_rec.server_hostname, ignoring the case of characters
* byte-by-byte comparison of Host and server_rec.names, ignoring the case of characters
* wildcard comparison of Host and server_rec.wild_names
See matches_aliases() at
http://svn.apache.org/viewvc/httpd/httpd/tags/2.4.12/server/vhost.c?view=markup (line 774)