apache 多端口
httpd_vhosts.conf 文件下:
加入
<VirtualHost *:80>
DocumentRoot "D:/AppServ/www/liuyan/zhang/xuexi/application/views/zhangyang"
ServerName www.b.com
<Directory "D:/AppServ/www/liuyan/zhang/xuexi/application/views/zhangyang">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
然后在 C:\Windows\System32\drivers\etc 下 hosts里增加:
127.0.0.1 www.a.com a.com www.b.com b.com
httpd.conf 下
----------------------释放以下内容,放在最底部---------------
Include conf/extra/httpd-vhosts.conf