php有關問題wampserver 區域網路無法訪問

來源:互聯網
上載者:User
php問題wampserver 區域網路無法訪問
今天測試了一個PHP的網頁, 出本機外區域網路其他機器無法訪問

經查詢得到問題解決辦法:

原文連結地址:http://www.nnbbxx.net/post-1426.html


wampserver2.5最新版本Apache : 2.4.9MySQL : 5.6.17PHP : 5.5.12PHPMyAdmin : 4.1.14當你安裝好之後開啟httpd.conf看到的原始配置是下面這樣的。原本的這種配置智能本機訪問,其他人不能訪問。看見預設的配置你會發現出現了兩個相同的。我感覺是相同的。而且2.5最新版本的httpd.conf檔案預設用記事本開啟是沒有換行的。坑爹但是你如果使用notepad++ 或者 sublime2或3開啟就可以看見換行了## DocumentR.........#此處省略N行注釋#..............and aliases may be used to point to other locations.#DocumentRoot "D:/wamp/www/"## Each directory.........#此處省略N行注釋#..............its subdirectories). ## First, we configure the "default" to be a very restrictive set of # features.  #    Require all denied## Note that fro.........#此處省略N行注釋#..............expect, make sure that you have specifically enabled it# below.#    #    # Possible values for the Options directive are "None", "All",    #此處省略N行注釋    # for more information.    #    Options Indexes FollowSymLinks    #    # AllowOverride.........    #此處省略N行注釋    #..............ileInfo AuthConfig Limit    #    AllowOverride all    #    # Controls who can get stuff from this server.    ##   onlineoffline tag - don't remove    Require local上面也說了上面的配置不行。下面就說說怎麼改。上面我已經粘出來了2處地方,那我們要修改也就是這兩處。看下面的配置方法。DocumentRoot "D:/wamp/www/"    AllowOverride none    order deny,allow    allow from all#    Require all denied    Options Indexes FollowSymLinks    AllowOverride all    order deny,allow    allow from all#    Require local上面的代碼看完之後是不是明白了。兩處地方都要修改其他人才能訪問,只修改一處地方那別人訪問的時候就會出現403的現象。上面的代碼就是我們把Require local注釋掉,在添加AllowOverride all、order deny,allow、allow from all這三行,其他人就可以訪問了。



  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.