apache设置虚拟主机目录

 时间:2026-04-22 08:02:17

1、打开Apache2 安装目录下的\conf\extra\, 找到 httpd-vhosts.conf 文件加入

<囊兼何VirtualHost *:80>

    DocumentRoot "D:\WWW\demo"

    ServerName demo.com

    ServerAlias 

  <Directory "戴净D:\WWW\bsxs">

     露菌 Options FollowSymLinks ExecCGI

      AllowOverride All

      Order allow,deny

      Allow from all

      Require all granted

  </Directory>

</VirtualHost>

如图:

apache设置虚拟主机目录

2、打开 httpd.conf 文件,Include conf/extra/httpd-vhosts.conf在470行的位置去掉前面的#号,如图:

apache设置虚拟主机目录

3、最后重启apache生效。

  • apache设置虚拟主机
  • apache配置虚拟主机
  • Apache如何创建虚拟主机
  • linux系统apache配置虚拟主机
  • linux环境下apache如何配置虚拟主机(一)
  • 热门搜索
    雪铁龙c6怎么样 黑龙江外国语学院怎么样 大人发烧怎么办 小孩牙痛怎么办 脸发红发烫是怎么回事 怎么学化妆 死飞怎么刹车 个人pos机怎么办理 毕业答辩ppt怎么做 怎么学好物理