一个IP对应多个域名解决思路
一个IP对应多个域名
------解决思路----------------------
如果是外网配置,检查下域名解析
如果是内部网络配置,检查win下etc hosts文件
<VirtualHost www.域名1:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /opt/lampp/htdocs/域名1目录
ServerName www.域名1
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
<Directory /opt/lampp/htdocs/域名1目录>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
# Alow From all
</Directory>
</VirtualHost>
<VirtualHost www.域名2:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /opt/lampp/htdocs/域名2目录
ServerName www.域名2
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
<Directory /opt/lampp/htdocs/域名2目录>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
# Alow From all
</Directory>
</VirtualHost>
<VirtualHost www.域名3:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /opt/lampp/htdocs/域名3目录
ServerName www.域名3
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
<Directory /opt/lampp/htdocs/域名3目录>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
# Alow From all
</Directory>
</VirtualHost>
现在遇到的问题是前两个好使,第3个域名访问的时候跳转的是第一个域名里的内容。。。求解。。
------解决思路----------------------
如果是外网配置,检查下域名解析
如果是内部网络配置,检查win下etc hosts文件