httpd.conf文件中找不到Deny from all这句,怎么配置多站点

1.打开httpd.conf 找到如下位置

   #Include conf/extra/httpd-vhosts.conf 去掉前面的#号

    然后找到

   #
   # Controls who can get stuff from this server.
   #
   如果是Require all denied 修改成 Require all granted 然后保存退出

2.修改vhost文件

3.根据要求修改C:\Windows\System32\Drivers\etc\hosts文件

4重启wamp服务

 

Apache 从2.2升级到 Apache2.4.x 后配置文件 httpd.conf 的设置方法有了大变化,以前是将 deny from all 全部改成 Allow from all 实现外网访问,现在是将 Require all denied 以及 Require local 都改为 Require all granted 。

posted @ 2017-12-05 09:09  小果同学  阅读(1679)  评论(0编辑  收藏  举报