#配置多个端口 允许访问多个项目
打开vhosts.conf文件修改配置
<VirtualHost *:801>
DocumentRoot "D:phpStudyWWWmyproject"
ServerName www.myproject.com
ServerAlias 192.168.0.1(这里换成你本地的IP)
<Directory "D:phpStudyWWWmyproject">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
打开 httpd-conf 配置文件 配置端口监听,增加801端口
#Listen
Listen 80
Listen 801(换成你配置的端口)
#配置好后重启Apache,浏览器中访问
192.168.0.1 (访问www.zentao.com)
192.168.0.1:801 (访问www.myproject.com)