Wamp服务器:更改Apache的httpd.conf吗?

问题描述:

我正在尝试用我的错误解决错误,我无法从服务器连接到我的android应用程序.

I am attempting to solve an error with my error, I am unable to connect from the server to my android application.

所有消息来源都将我引向

All sources are pointing me towards the following tutorial as the solution.

我成功完成了本教程中的所有步骤,除了:

I have completed all steps in the tutorial successfully apart from:

编辑Wamp服务器的httpd.conf文件

即本教程指导以下内容:

I.e. the tutorial instructs the following:

4.在httpd.conf文件中找到此配置部分:

4 .Find this section of configuration within the httpd.conf file:

Directory "c:/wamp/www/"
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* — "Options All"
# doesn’t give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all

#
# Controls who can get stuff from this server.
#



 # onlineoffline tag – don’t remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1

现在找到"127.0.0.1"并将其替换为全部",保存文件并重新启动wamp服务器.

Now Find and replace ’127.0.0.1′ with ‘All’, save the file and restart your wamp server.

但是,我的问题是我的httpd.conf 文件中没有此代码.我的相应部分如下所示:

However, my issue is that I do not have this code within my httpd.conf file. My corresponding section looks like this:

<Directory "c:/wamp/www/">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #

#   onlineoffline tag - don't remove
    Require all granted
</Directory>

我可以在代码中进行哪些更改以解决此问题?

一个解决方案将不胜感激,我已经被服务器问题困扰了一个多星期:(

A solution would be greatly appreciated, I have now been stuck with server issues for over a week :(

知道这已经很老了,但是它可以减轻我试图修复禁忌王国错误"时遇到的压力,这使我不禁动了脑筋google ...多数民众赞成在403错误,以防您错误地认为自己不知道我在说什么.如果您这样做,那简直太棒了,而且很热! *单击系统托盘上的WAMP服务器图标(假设您正在使用Windows),然后-> Apache-> httpd.vhosts.conf [打开"httpd.vhosts.conf"文件] *并将目录"标记(...)中的需要本地"更改为需要全部授予" 这应该是您要寻找的炸弹! *再次单击WAMP图标,然后重新启动所有服务,然后最后进入联机"状态.最后,最后一点,你一切都好!

Know this is old, but it could save someone the stress I went through trying to fix the "Forbidden-Kingdom-Error" that got me twerking my fingers on google... thats the 403 error incase you mistakenly think you have no idea what I'm talking about. and if you do thats simply Awesome and way Hot! *click on the WAMP server icon on the system tray(I am assuming you're using windows) and then ->Apache-> httpd.vhosts.conf [open the "httpd.vhosts.conf" file] *and change "Require local" in the Directory tag( ...) to "Require all granted" .This should be the bomb you're looking for! *click the WAMP icon again and Restart all services then put Online finally. FINALLY and extra FINALLY you are good2 go!

这绝对对您4有用,尤其是在按照有关通过修改防火墙设置(即通过添加新规则)并按照说明修改httpd.conf文件的方式将Android设备连接到Wamp服务器的在线教程之后,而您仍然获取禁止的错误"代号-403.

N.B This should definitely work 4 you especially if after following online-tutorials on how to connect your Android device to your Wamp server by modifying your firewall settings(i.e by adding a new rule) and modifying the httpd.conf file as instructed and you are still getting the "Forbidden error" codename-403.