NameVirtualHost 60.191.43.53:80
<VirtualHost www.ryuhi.com>
ServerAdmin webmaster@ryuhi.com
DocumentRoot E:/vhosts/ryuhi/new_web
ServerName www.ryuhi.com
</VirtualHost>
<Directory
“E:/vhosts/ryuhi/new_web”>
Options
FollowSymLinks Includes ExecCGI
AllowOverride All
Order
allow,deny
Allow from
all
</Directory>
<VirtualHost www.zjgps.net>
ServerAdmin webmaster@zjgps.net
DocumentRoot E:/vhosts/hzdjt
ServerName www.zjgps.net
</VirtualHost>
<Directory “E:/vhosts/hzdjt”>
Options
FollowSymLinks Includes ExecCGI
AllowOverride All
Order
allow,deny
Allow from
all
</Directory>
在httpd.conf里指定的DocumentRoot和ServerName到这里还要重新写一遍,一般写在最前面,这样的话,Apache会将这个配置作为该IP的服务器的默认访问网站。