apache配置多域名多站点记录

时间:2024-08-04 08:05:37

<VirtualHost *:80>
  DocumentRoot "/mnt/web/www.*.cn"
  ServerName www.*.cn
  ErrorLog "logs/www-error.log"
  CustomLog "logs/www-access.log" common
  <Directory "/">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "/mnt/web/m.*.cn"
  ServerName m.*.cn
  ErrorLog "logs/www-error.log"
  CustomLog "logs/www-access.log" common
  <Directory "/">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "/mnt/web/cb.*.cn"
  ServerName cb.*.cn
  ServerAlias  cb.*.cn cookbook.*.cn
  ErrorLog "logs/www-error.log"
  CustomLog "logs/www-access.log" common
  <Directory "/">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "/mnt/web/www.*.com.cn"
  ServerName www.*.com.cn
  ErrorLog "logs/www-error.log"
  CustomLog "logs/www-access.log" common
  <Directory "/">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>