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如何配置虚拟主机(一)
  • 热门搜索
    233333是什么意思 粗中有细的意思 fc是什么意思 社保卡补办需要什么 环视的意思 身高175穿什么尺码 母亲节贺卡祝福语大全 圣诞祝福语 华贵的意思 中国祝福你