Apache2.4.18 錯誤403
巴扎黑
巴扎黑 2017-05-16 16:59:44
0
3
596

1.背景:
小弟菜鳥,想在公司區域網路搭建web管理系統,但是在搭建環境時遇到問題百度1天都沒百出來 啥,都是過期複製貼上的答案。
2.環境:
安裝環境:
1)Win7Pro(32bit)中文(非虛擬機器)
2)Wampserver3.0.4(Server Software:Apache/2.4.18 (Win32) PHP/ 5.6.19 - Port defined for Apache: 80)
3.問題描述:
1)安裝完wampserver後啟動正常,透過localhos,本機ip,127.0.0.1都可以存取正常。
但是我在區域網路其它機器上存取服務會提示存取拒絕沒有權限巴拉巴拉巴拉。 。如下截圖:

錯誤日誌:

[authz_core:error] [pid 4544:tid 864] [client 192.168.221.122:49359] AH01630: client denied by server configuration: C:/wamp/www/favicon.ico
[authz_core:error] [pid 4544:tid 856] [client 192.168.221.122:49363] AH01630: client denied by server configuration: C:/wamp/www/

2)出現上面問題讓我這個菜鳥都市懵逼了,百度谷歌都沒解決,大部分答案是修改http.conf目錄訪問權限,然後我也修改了,允許所有訪問重啟服務重啟電腦,但是還是出現上面存取拒絕

DocumentRoot "c:/wamp/www"
<Directory "c:/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>

4.總結:
折騰一天了,太累人了,求大神指點,感謝不盡

巴扎黑
巴扎黑

全部回覆(3)
淡淡烟草味

這個問題也是搞好半天了。 。 。 。 。 apache 2.4.18** 結果是:還要修改 Virtual Hosts 檔案在conf/extra/httpd-vhosts.conf !!!!!

ServerName localhost
DocumentRoot d:/wamp/www
<Directory  "d:/wamp/www/">
    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    #Require local
    Require all granted
</Directory>

phpcn_u1582

把你機器上防火牆關了試試吧,在高階系統管理裡面!

淡淡烟草味

wampsever3選單有了變化,put online/offline 功能需要開啟,右鍵服務圖片找到選單選項,開啟put online/offline 選單然後put on line就可以在其他機器存取了,但這個功能也是透過修改httpd.conf檔案
將目錄存取權限Require local>Require all granted 但是手動修改就不行,不知道咋回事,有知道的大神指點下。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!