设置wamp外部能访问


wamp默认情况下apache设置只能本机能访问,外部访问都会报403错误,如果我们需要外部能访问只需要修改apache的配置文件http.conf参数就行来了,修改如下:

原参数:

<Directory />

AllowOverride none

Require all denied

</Directory>

修改成:

   <Directory />

      AllowOverride none

    #Require all denied

    Options FollowSymLinks

    Order deny,allow

     allow from all

</Directory>

原参数:

<Directory "D:/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:

#   Options FileInfo AuthConfig Limit

#

AllowOverride All

#

# Controls who can get stuff from this server.

#

# Online --> Require all granted

#   onlineoffline tag - don't remove

Require all denied

</Directory>

修改成:

<Directory "D:/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:

#   Options FileInfo AuthConfig Limit

#

AllowOverride All

#

# Controls who can get stuff from this server.

#

# Online --> Require all granted

#   onlineoffline tag - don't remove

Options FollowSymLinks

Order deny,allow

allow from all

</Directory>

修改这两处就可以在外面访问了。

QQ截图20140121152354

 

 


Whatever is worth doing is worth doing well.