Apache2.4.18 錯(cuò)誤403
問題描述
1.背景:小弟菜鳥,想在公司局域網(wǎng)搭建web管理系統(tǒng),但是在搭建環(huán)境時(shí)遇到問題百度1天都沒百出來 啥,都是過期復(fù)制粘貼的答案。2.環(huán)境:安裝環(huán)境:1)Win7Pro(32bit)中文(非虛擬機(jī))2)Wampserver3.0.4(Server Software:Apache/2.4.18 (Win32) PHP/5.6.19 - Port defined for Apache: 80)3.問題描述:1)安裝完wampserver后啟動(dòng)正常,通過localhos,本機(jī)ip,127.0.0.1都可以訪問正常。但是我在局域網(wǎng)其它機(jī)器上訪問服務(wù)會(huì)提示訪問拒絕沒有權(quán)限巴拉巴拉巴拉。。如下截圖:錯(cuò)誤日志:
[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)出現(xiàn)上面問題讓我這個(gè)菜鳥都市懵逼了,百度谷歌都沒解決,大部分答案是修改http.conf目錄訪問權(quán)限,然后我也修改了,允許所有訪問重啟服務(wù)重啟電腦,但是還是出現(xiàn)上面訪問拒絕
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.總結(jié):折騰一天了,太累人了,求大神指點(diǎn),感謝不盡
問題解答
回答1:這個(gè)問題也是搞了好半天。。。。。apache 2.4.18** 結(jié)果是:還需要修改 Virtual Hosts 文件在conf/extra/httpd-vhosts.conf !!!!!
<VirtualHost *:80>
ServerName localhostDocumentRoot d:/wamp/www<Directory 'd:/wamp/www/'> Options +Indexes +FollowSymLinks +MultiViews AllowOverride All #Require local Require all granted</Directory>
</VirtualHost>
回答2:把你機(jī)器上防火墻關(guān)了試試吧,在高級(jí)系統(tǒng)管理里面!
回答3:wampsever3菜單有了變化,put online/offline 功能需要開啟,右擊服務(wù)圖片找到菜單選項(xiàng),開啟put online/offline 菜單然后put on line就可以在其他機(jī)器訪問了,但是這個(gè)功能也是通過修改 httpd.conf文件將目錄訪問權(quán)限 Require local>Require all granted 但是手動(dòng)修改就不行,不知道咋回事,有知道的大神指點(diǎn)下。
相關(guān)文章:
1. javascript - 如何將一個(gè)div始終固定在某個(gè)位置;無論屏幕和分辨率怎么變化;div位置始終不變2. html - vue項(xiàng)目中用到了elementUI問題3. javascript - 原生canvas中如何獲取到觸摸事件的canvas內(nèi)坐標(biāo)?4. javascript - vscode alt+shift+f 格式化js代碼,通不過eslint的代碼風(fēng)格檢查怎么辦。。。5. javascript - 求解答:實(shí)例對(duì)象調(diào)用constructor,此時(shí)constructor內(nèi)的this的指向?6. javascript - 有什么比較好的網(wǎng)頁(yè)版shell前端組件?7. java - 如何寫一個(gè)intellij-idea插件,實(shí)現(xiàn)編譯時(shí)修改源代碼的目的8. javascript - [js]為什么畫布里不出現(xiàn)圖片呢?在線等9. java 中Long 類型如何轉(zhuǎn)換成Double?10. html5 - 有可以一次性把所有 css外部樣式轉(zhuǎn)為html標(biāo)簽內(nèi)style=" "的方法嗎?
