shanghaipc 发表于 2018-11-22 08:12:37

Apache 泛域名 与 ip独立访问 遵循顺序

  当apache 配置泛域名,及无域名独立Ip访问时,加载顺序是关键;
  当Ip配置在前,泛域名在后时,所以泛域名的解析会自动进入Ip配置处理。
  必须,要泛域名在前!
  
  ServerAdmin webmaster@dummy-host.com
  DocumentRoot "/var/test"
  ServerName *.test.com
  ....
  

  
  ServerAdmin webmaster@dummy-host.com
  DocumentRoot "/var/test1"
  ServerName 192.168.1.2
  ...
  




页: [1]
查看完整版本: Apache 泛域名 与 ip独立访问 遵循顺序