<VirtualHost www.域名1:80>
ServerAdmin [email protected]
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 [email protected]
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 [email protected]
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文件
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群