shuniuniu

一、解析二级域名

 

解析之后,ping一下测试域名是否生效

 

二、在apache配置文件中开启vhost扩展和rewrite扩展

 

去掉前面的#

 

三、在httpd-vhosts.conf配置文件中 配置多个虚拟主机

配置格式是这样的 把这个复制一份 粘贴到下面 ,

<VirtualHost *:80>

    ServerAdmin webmaster@dummy-host.example.com                  //    管理员邮箱         

    DocumentRoot "c:/Apache24/docs/dummy-host.example.com"        //网站根目录

    ServerName dummy-host.example.com                                //二级域名

    ServerAlias www.dummy-host.example.com

    ErrorLog "logs/dummy-host.example.com-error.log"

    CustomLog "logs/dummy-host.example.com-access.log" common

</VirtualHost>

 

 

注:如果服务器用的lnmp的集成环境。  lnmp vhost add配置二级域名

分类:

技术点:

相关文章:

  • 2021-12-22
  • 2021-09-07
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2021-08-15
猜你喜欢
  • 2021-12-02
  • 2022-02-07
  • 2021-12-28
  • 2021-12-12
  • 2021-12-22
相关资源
相似解决方案