简体   繁体   中英

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.

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

Ie the tutorial instructs the following:

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

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

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>

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. 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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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