本地搭建WampServer,输入http://127.0.0.1访问正常,当输入http://localhost/,apache出现You don't have permission to access/on this server的提示,如何解决?

找到httpd.conf,用记事本打开httpd.conf,有两处需要修改:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>