一个IP多个站点配置有关问题
Jun 13, 2016 pm 12:50 PM
一个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的程序!网上找了很多也没找到正解 望高手们帮看看
------解决方案--------------------
同一个端口怎么识别呢?
------解决方案--------------------
并没有发现写法上的问题,我也是这么写的
可能与 apache 的版本或其他设置有关

熱門文章

熱門文章

熱門文章標籤

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

OOBELANGUAGE錯誤Windows 11 / 10修復中出現問題的問題
