wampserver如何設定區域網路內可訪問,wampserver區域網路

來源:互聯網
上載者:User

wampserver如何設定區域網路內可訪問,wampserver區域網路

剛安裝好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方式就可以訪問到本機伺服器上的內容了。




聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.