apache泛域名解析

<VirtualHost *:80>
    DocumentRoot "E:\work\phpStudy\WWW\ncpx\web"
    ServerName ncpxceshi2.com        ###主机名
    ServerAlias *.ncpxceshi2.com       ###范解析
  <Directory "/">
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
</VirtualHost>

dns解析的时候可以添加 a.ncpxceshi2.com  c.ncpxceshi2.com  等等二级域名

用途:伪静态的时候重写域名 比如sport.shop.com进入的运动页面 book.shop.com进入的是图书页面

posted @ 2016-11-29 21:56  yangboom  阅读(3172)  评论(0编辑  收藏  举报
TOP