wampserver如何设置局域网内可访问

刚安装好wampserver,我的版本是WampServer Version 2.5

Apache的版本是2.4.9。

如果没有特别配置的话,在pc上用localhost或者本地ip或者127.0.0.1都是可以访问的,但是如果你在其它pc或者手机(内网wifi)访问的话,是不可以的,即使用的是192.168.x.x。

打开..\wamp\bin\apache\apache2.4.9\conf\httpd.conf配置文件,

#

# 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

Require all granted       #只需增加这行字母,此注释不能添加,因为不能增加中文

# Controls who can get stuff from this server.

#

#   onlineoffline tag - don‘t remove

Require local

以上粗体的部分为增加的内容。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。