apache设置虚拟主机目录

 时间:2026-02-18 02:46:01

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如何配置虚拟主机(一)
  • 热门搜索
    裸辞是什么意思 枣的功效与作用 工口是什么意思 流光溢彩的意思 t是什么意思 直发染什么颜色好看 番号有什么用 act是什么意思 丰衣足食的意思 isp是什么意思