apache设置虚拟主机目录
1、打开Apache2 安装目录下的\con酆璁冻嘌f\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>如图:

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

3、最后重启apache生效。