127.0.0.1不工作WAMP的服务器上 [英] 127.0.0.1 not working on wamp server

查看:263
本文介绍了127.0.0.1不工作WAMP的服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的系统中安装了WAMP和的http://本地主机正在很好地

I have installed WAMP in my system and http://localhost is working nicely.

但是,当我再127.0.0.1它给故宫错误:

but when i got 127.0.0.1 then it gives Forbidden error:

禁止

您没有权限访问/在此服务器上。

我不知道这是什么错误

在httpd.config我必须给予许可,让所有:

in httpd.config i have give permission to allow all:

<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Allow from all
    Allow from 127.0.0.1
</Directory>

如果我在主机文件设置

and if i set in my host file

127.0.0.1  localhost
127.0.0.1  test

和接入测试它给出同样的错误。任何建议将AP preciated.thanks

and access test it gives same error. Any suggestion would be appreciated.thanks

推荐答案

针对Apache 2.4.x的正确的语法是

The correct syntax for Apache 2.4.x is

<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted
</Directory>

现在,如果你没有真正想要,而你它发展到整个互联网一个更好的方法是让访问您的网站

Now if you did not actually want to give access to your site while you develop it to the whole internet a better method would be

<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Require local
</Directory>

在需要本地覆盖本地主机,127.0.0.1和:: 1。 :: 1是IPV6相当于127.0.0.1的

The require local covers localhost, 127.0.0.1 and ::1. ::1 is the IPV6 equivalent of 127.0.0.1

如果您希望能够从其他电脑访问WAMPServer(Apache)的本地网络上,那么你可以加入这一行,以及

If you want to be able to access the WAMPServer (Apache) from other PC's on your local network then you can include this line as well

<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Require local
    Require ip 192.168.0
</Directory>

请注意:我只用正常的4四分集的第一个3分位数,这可以访问任何IP在你的内部子网

Note: I used only the first 3 quartiles of the normal 4 quartile set, this gives access to any ip on your internal subnet.

您必须检查你的实际子网是为192.168.0.x的是默认值,但并不适用于所有家用路由器。

You will have to check what your actual subnet is as 192.168.0.x is a default but not for all home routers.

我可以建议你阅读本文件,并为所需的修复WAMPServer 2.4版本。一个使每个变化之一,并确保Apache和MySQL在每次更改后重新开始这样你就可以知道你在哪里犯任何错误,因为它们发生,而不是做他们都一气呵成!

Can i suggest you read this document and make the required fixes for the WAMPServer 2.4 release. Make each change one by one and make sure that Apache and MySQL start again after each change so you can know where you make any mistakes, as they happen, rather than doing them all in one go!

这篇关于127.0.0.1不工作WAMP的服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆