Apache虚拟主机配置

swzk112 2016-08-25 07:40:46
各位好
我在vps上搭建了多个网站,httpd.conf配置是这样的
<VirtualHost *:80>
ServerAdmin xxxx@xxx.com
DocumentRoot /var/www/html/xxxx1
ServerName www.xxxx1.com
ErrorLog logs/xx-error_log
CustomLog logs/xx-access_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin xxxx@xxx.com
DocumentRoot /var/www/html/xxxx2
ServerName www.xxxx2.com
ErrorLog logs/xx-error_log
CustomLog logs/xx-access_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin xxxx@xxx.com
DocumentRoot /var/www/html/xxxx3
ServerName www.xxxx3.com
ErrorLog logs/xx-error_log
CustomLog logs/xx-access_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin xxxx@xxx.com
DocumentRoot /var/www/html/xxxx4
ServerName www.xxxx4.com
ErrorLog logs/xx-error_log
CustomLog logs/xx-access_log common
</VirtualHost>

域名解析确定没问题,然后正常用http://www.xxxxx.com访问网站没有问题,但是用http://xxxxx.com访问的时候都
跳转到http://www.xxxx1.com这个地址,注释掉其他,只留一个是正常的,请教各位,是哪里出问题了?
...全文
458 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
swzk112 2017-06-07
  • 打赏
  • 举报
回复
这个帖子没有人回复

24,922

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧