简体   繁体   English

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

[英]Wamp server: Changing httpd.conf for apache?

I am attempting to solve an error with my error, I am unable to connect from the server to my android application. 我正在尝试用我的错误解决错误,我无法从服务器连接到我的android应用程序。

All sources are pointing me towards the following tutorial as the solution. 所有资源都将我引向以下教程作为解决方案。

I have completed all steps in the tutorial successfully apart from: 除了以下方面,我已经成功完成了本教程中的所有步骤:

Edit httpd.conf file of Wamp server 编辑Wamp服务器的httpd.conf文件

Ie the tutorial instructs the following: 即,该教程指示以下内容:

4 .Find this section of configuration within the httpd.conf file: 4。在httpd.conf文件中找到此配置部分:

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

Now Find and replace '127.0.0.1′ with 'All', save the file and restart your wamp server. 现在,找到“ 127.0.0.1”并将其替换为“全部”,保存文件并重新启动wamp服务器。

However, my issue is that I do not have this code within my httpd.conf file. 但是,我的问题是我的httpd.conf文件中没有此代码 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>

What can I change within my code to solve this? 我可以在代码中进行哪些更改以解决此问题?

A solution would be greatly appreciated, I have now been stuck with server issues for over a week :( 一个解决方案将不胜感激,我已经被服务器问题困扰了一个多星期:(

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. 知道这是古老的,但是它可以免除我尝试修复“禁止的国王错误”时遇到的压力,这使我在Google上摸不着头脑……多数民众赞成在403错误的情况下,如果您错误地认为自己一无所知我在说 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! *单击系统任务栏上的WAMP服务器图标(假设您正在使用Windows),然后-> Apache-> httpd.vhosts.conf [打开“ httpd.vhosts.conf”文件] *并更改“ Require目录标签(...)中的“本地”,以“要求所有被授予”。这应该是您要找的炸弹! *click the WAMP icon again and Restart all services then put Online finally. *再次单击WAMP图标,然后重新启动所有服务,然后最后进入“联机”状态。 FINALLY and extra FINALLY you are good2 go! 总而言之,你一切都好!

NB 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(ie by adding a new rule) and modifying the httpd.conf file as instructed and you are still getting the "Forbidden error" codename-403. 注意:这绝对可以为您工作4,尤其是在按照有关如何通过修改防火墙设置(即通过添加新规则)和按照说明修改httpd.conf文件的方式将Android设备连接到Wamp服务器的在线教程之后,仍然得到“禁止的错误”代号-403。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM