問題:今天配製一個測試機服務器 Apache2.4.9本地訪問正常可是在局域網或外網IP拒絕訪問php
局域網瀏覽器報錯以下圖:html
查看Apache報錯日誌以下信息:sql
[Fri May 13 15:10:08.565138 2016] [authz_core:error] [pid 4964:tid 836] [client 192.168.0.200:53640] AH01630: client denied by server configuration: F:/wamp/www/test/
[Fri May 13 15:10:09.749206 2016] [authz_core:error] [pid 4964:tid 836] [client 192.168.0.200:53640] AH01630: client denied by server configuration: F:/wamp/www/test/瀏覽器
解決以下:服務器
一、關閉防火牆(注:包括殺毒軟件,防火牆),固然你也能夠寫規則開放你服務器的端口ide
a、通常若是你的Apache是2.2版本如下的配製以下虛擬主機就能夠解決此問題學習
<VirtualHost *:80>
<Directory "F:/wamp/www/test">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin 826096331@qq.com
DocumentRoot "F:/wamp/www/test"
ServerName www.test.com
DirectoryIndex index.php index.html
ServerAlias test.com
ErrorLog "logs/test.bin-error_log"
CustomLog "logs/test.bin-access_log" common
</VirtualHost>測試
b、若是你的Apache服務器是2.4.0以上的版本你還須要作第2步
網站
二、 在虛擬主機配製文件中添加 Require all granted
ui
<VirtualHost *:80>
<Directory "F:/wamp/www/test">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
ServerAdmin 826096331@qq.com
DocumentRoot "F:/wamp/www/test"
ServerName www.test.com
DirectoryIndex index.php index.html
ServerAlias test.com
ErrorLog "logs/test.bin-error_log"
CustomLog "logs/test.bin-access_log" common
</VirtualHost>
三、重啓你本身的Apache服務器生效
PHP+Mysql網站源碼學習請訪問二當家的:PHP+Mysql網站源碼學習請訪問