一个IP多个站点配置问题
我想把两个域名解析到同一个209.221.156.243这个IP上,但是配置apache后 两个域名始终指向同一个站
配置代码如下:
NameVirtualHost 209.221.156.243:80
ServerName xx.com
DocumentRoot d:/aa
ErrorDocument 404 /404.html
ErrorLog "|bin/rotatelogs.exe -l d:/aa/logs/errorlog.%Y-%m-%d-%H_%M_%S.log 86400"
CustomLog "|bin/rotatelogs.exe -l d:/aa/logs/access%Y-%m-%d.log 86400" combined
RewriteEngine on
RewriteCond %{HTTP_HOST} ^xx.com [NC]
RewriteRule ^(.*)$ http://www.xx.com$1 [L,R=301]
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
ServerName yy.com
DocumentRoot d:/bb
ErrorDocument 404 /404.html
ErrorLog "|bin/rotatelogs.exe -l d:/bb/logs/errorlog.%Y-%m-%d-%H_%M_%S.log 86400"
CustomLog "|bin/rotatelogs.exe -l d:/bb/logs/access%Y-%m-%d.log 86400" combined
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yy.com [NC]
RewriteRule ^(.*)$ http://www.yy.com$1 [L,R=301]
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
访问yy.com却访问到xx.com的程序!网上找了很多也没找到正解 望高手们帮看看