http://www.kingmx.com/Manual/ApacheMenu/index.html
基于主机名的虚拟主机(一个IP地址,多个网站)
Listen 80
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain
</VirtualHost>
<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>
http://www.kingmx.com/Manual/ApacheMenu/vhosts/examples.html
域名访问--->Apache:80,根据域名重写url --->tomcat:81/82...
<VirtualHost *:80>
ServerAdmin cc@cc.com
DocumentRoot "D:/Tomcat 5.0/webapps/ROOT"
ServerName cc.com, *.cc.com
ErrorLog logs/cc.com-error_log
CustomLog logs/cc.com-access_log common
ProxyPass / http://127.0.0.1:81/
ProxyPassReverse / http://127.0.0.1:81/
</VirtualHost>
<VirtualHost *:80>
ServerAdmin zzyy@zzyy.com
DocumentRoot "D:/Tomcat 5.0/webapps/ROOT"
ServerName www.zz.com, www.yy.com
ErrorLog logs/zzyy.com-error_log
CustomLog logs/zzyy.com-access_log common
ProxyPass / http://127.0.0.1:82/
ProxyPassReverse / http://127.0.0.1:82/
</VirtualHost>