wampserver2.5 apache2.4.9:forbidden,本機可以訪問,局域網內部能訪問。


wampserver2.5 apache2.4.9:forbidden,本機可以訪問,局域網內部能訪問。

因為做項目,多人分工,需要局域網內訪問各自的項目。

然后安裝了wampserver2.5,Apache版本比較高2.4.9,局域網內的其他用戶需要通過192.168.16.x來訪問我的項目。其他人的都能正常 訪問,就是我的不行。高了幾個小時。悲哀啊。

無論是list監聽:

#Listen 12.34.56.78:80
Listen 192.168.16.x:80
#Listen [::0]:80

 

還是服務名:

#ServerName 192.168.16.x:80

 

或是httpd-vhosts.conf:

<VirtualHost 192.168.16.x:80>
ServerAdmin webmaster@xxx.com
DocumentRoot "F:\wamp\www\myhangxian"
ServerName xxx.com
#ErrorLog "F:/wamp/www/xxx/log/error.log"
#CustomLog "F:/wamp/www/xxx/log/access.log" common
<Directory "F:/wamp/www/xxx">
#Options Indexes FollowSymLinks
#AllowOverride all
#Order Allow,Deny
Allow from all
Allow from 192.168.16.x
</Directory>


</VirtualHost>

 

搞死了就是不能訪問。

 

最后無意間在這里發現了答案:

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

    #
    # Controls who can get stuff from this server.
    #

    #   onlineoffline tag - don't remove
    #Require local   
    Require all granted 

</Directory>

  

將 Require local   修改成:    Require all granted 

以此為鑒。權當記錄。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM