Apache 2.x 基于主机名的虚拟主机

NameVirtualHost *:80

<VirtualHost *:80>
ServerName a.lostk.com
DocumentRoot e:/webserver/htdocs/a
ErrorLog e:/webserver/apache/logs/a.lost-error.log
CustomLog e:/webserver/apache/logs/a.lost-access.log common
    <Directory "e:/webserver/htdocs/a">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName b.lostk.com
DocumentRoot e:/webserver/htdocs/b
ErrorLog e:/webserver/apache/logs/b.lost-error.log
CustomLog e:/webserver/apache/logs/b.lost-access.log common
    <Directory "e:/webserver/htdocs/b">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
2007-12-10 161 apache http 虚拟主机