/ 中存储网

Apache服务器如何设置允许所有ip访问

2014-03-23 08:08:01 来源:itjs.cn
Wamp默认不允许ip访问,需要修改以下代码:

<Directory "E:/websites">

    #

    # 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

    Allow from all

    Allow from 127.0.0.1

</Directory>

红色部分的Allow(允许的意思),原来是Deny(禁止的意思)。其他的Deny不用修改。