看慕课网的php教程遇到的问题和解决
apache 2.4.9 出现forbidden错误的,在httpd.conf内Directory下的
# onlineoffline tag - don't remove
Require local
中Require local前加#,换行后加Require all granted,重启服务。
另:配置完多站点后,如果访问localhost打不开,可能是因为你设置的根目录没有绑定域名localhost。需要在修改httpd-vhosts.conf这一步,像添加域名test01.com那样,再添加上域名localhost的部分:
DocumentRoot "A:/WampServer/Demo"
ServerName localhost这样之前的localhost就可以打开了