Configuring appear Forbidden You do not have permission apache2.4 time to access / on this server. Problem Solution

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/A1344714150/article/details/95341261

After installing wampserver, you can access the web page by accessing localhost or 127.0.0.1;

However, access to the public network ip address of the server through other computers, has been shown in the display forbid ....:

Check out blog posts, I found the problem with the conventional solution is to modify two configuration in httpd.conf.

My solution process

First

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

change into

<Directory />
    Options FollowSymLinks
    AllowOverride none
    Require all granted
</Directory>

Then

DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/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 +Multiviews

    #
    # 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 local
   AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
</Directory>

change into

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

After these two configuration modifications are complete, save and restart the service. .

It was found that the server or ip access through the public network can not page.

Finally, the big brother of that post, also need to modify httpd-vhost.conf configuration.

The original post link: https://bbs.csdn.net/topics/390904273?list=23494857

Finally, the httpd-vhost.conf configuration by Gangster solutions modify, save and restart the service, the success of the public network ip access the server via a web page.

Guess you like

Origin blog.csdn.net/A1344714150/article/details/95341261