apache配置虚拟主机

来源:
http://oss.org.cn/man/newsoft/ApacheManual/vhosts/name-based.html

使用基于域名的虚拟主机

NameVirtualHost *

<VirtualHost *>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain
</VirtualHost>

<VirtualHost *>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>

你可能感兴趣的:(apache)