局域网访问php forbidden,PHP访问时Forbidden403错误
問(wèn)題描述:再自己電腦上用localhost訪問(wèn)沒(méi)有問(wèn)題,同一局域網(wǎng)下其它機(jī)器無(wú)法訪問(wèn)并出現(xiàn)以下提示!
you do not have permission to access / on this server
apache/2.4.9(win64) php/5.5.12 server at 192.168.0.106 port 80
這需要更改apache\conf目錄下的httpd.conf配置文件
(1)打開(kāi)httpd.con查找
……
(2)將這段內(nèi)容修改為
Options FollowSymLinks
#AllowOverride None ? //公網(wǎng)注釋
#Require all denied ? ?//局域網(wǎng)刪除 ?公網(wǎng)注釋
Order deny,allow
Allow from all
Satisfy all
(3)再次查找
? //路徑為PHP下www目錄的所在位置
……
這中間的內(nèi)容不少,大概20行左右
(4)將這段內(nèi)容修改為
##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.2/mod/core.html#option
#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:
#Options FileInfo AuthConfig Limit
#AllowOverride all
##Controls who can get stuff from this server.
##onlineoffline tag - don‘t remove
Order Deny,Allow
#Deny from all
#Allow from 127.0.0.1
Allow from all
(5)修改保存完成后重啟apache
總結(jié)
以上是生活随笔為你收集整理的局域网访问php forbidden,PHP访问时Forbidden403错误的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: php单词出现频率,PHP计算文件或数组
- 下一篇: java整合mybatis,spring