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

转载时请标明文章原始出处和作者信息, 作者: lostsnow.
http://www.lsproc.com/blog/apache2x_name_based_virtual_hosting/

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>

-- EOF --

Related Posts

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>