首页 > 其他 > 详细

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

时间:2015-01-20 18:11:56      阅读:14156      评论:0      收藏:0      [点我收藏+]

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

Apache的版本是2.4.9。


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

http://www.mamicode.com/info-detail-247002.html


我找了一些资料,通过上面的资料中设置了一下,发现wampserver根本运行不起来了,所以肯定是修改的东西有错了。

通过排除法发现是因为注释中的中文,把中文部分去掉即可。

最后 ,我所修改的配置部分如下:


<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:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride all
    Require all granted   
    
    # Controls who can get stuff from this server.
    #


#   onlineoffline tag - don‘t remove
   Require local
</Directory>


以上红色的部分为增加的内容。

测试通过,在手机端通过192.168.x.x方式就可以访问到本地服务器上的内容了。




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

原文:http://blog.csdn.net/wuweitiandian/article/details/42918675

(3)
(5)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!