无法使用wamp和Chrome访问本地主机 [英] Can't access localhost with wamp and Chrome
问题描述
编辑:为我解决它。
$ b 这是一个IPv6问题。 Google必须刚刚更新Chrome。
首先确保您的主机文件具有以下行,并取消注释。
:: 1 localhost
接下来,打开(httpd.conf),并将以下内容添加到listen部分:
Listen [:: 1]:80
接下来,您需要编辑httpd.conf或vhosts文件中的Directory语句。他们可能看起来像这样。
<目录C:\路径>
选项索引FollowSymLinks
订单拒绝,允许
拒绝所有
允许来自127.0.0.1
AllowOverride全部
< / Directory>
在'Allow from 127.0.0.1'之后添加一行,看起来像这样
<目录C:\路径>
期权指数FollowSymLinks
指令拒绝,允许
拒绝所有
允许从127.0.0.1
允许:: 1
AllowOverride全部
< /目录>
from today, when I go to localhost (http://localhost) after launch WAMP, in Firefox, as usual, everything is normal, but Chrome says "Forbidden, You don't have permission to access / on this server."
Anyone can help me please ?
Edit: Solved it for me.
This is an IPv6 problem. Google must have just updated Chrome.
First of all ensure that your hosts file has the following line and that it is uncommented.
::1 localhost
Next, open up your Apache config (httpd.conf) and add the following to the listen section:
Listen [::1]:80
Next, you need to edit you Directory statements in httpd.conf or your vhosts files. They probably look something like this.
<Directory "C:\path">
Options Indexes FollowSymLinks
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
AllowOverride All
</Directory>
Add an extra line after the 'Allow from 127.0.0.1' so it looks like this
<Directory "C:\path">
Options Indexes FollowSymLinks
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
AllowOverride All
</Directory>
这篇关于无法使用wamp和Chrome访问本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!