问题背景:     

      在apache的httpd.conf里新增加了1个VirtualHost,域名是xxx.com,此时,服务器总共2个VirtualHost ,service httpd restart的时候却出现了下面的警告提示:

[warn] _default_ VirtualHost overlap on port 80, the first has precedence

      大概意思就是说后面新增加的这个VirtualHost 由于端口被占用,不能生效,沿用第一个虚拟主机的配置。

      检查了一下,发现原来在httpd.conf里,我没有把#NameVirtualHost *:80前的注释去掉,导致这个没有生效。

解决方案:

去掉#NameVirtualHost *:80前面的#号,然后重启apache即可。

相关文章:

  • 2022-12-23
  • 2021-12-28
  • 2021-12-20
  • 2021-04-24
  • 2021-05-08
  • 2022-01-18
  • 2022-12-23
猜你喜欢
  • 2021-12-08
  • 2022-01-19
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2022-01-09
相关资源
相似解决方案