Jquery中文网 新宝娱乐城官网 www.z5nka.com.cn
Jquery中文网 >  脚本编程  >  php  >  正文 PHP错误:Forbidden You don't have permission to access / on this server

新宝娱乐城返水:PHP错误:Forbidden You don't have permission to access / on this server

发布时间:2018-06-04   编辑:新宝娱乐城官网 www.z5nka.com.cn
测试php程序时出现问题:Forbidden You don't have permission to access / on this server.

新宝娱乐城官网 www.z5nka.com.cn 用//localhost/test.php进行的测试,没有发现问题,后来要在内网测试一下就要用IP地址进行那个访问了,如://10.10.50.195/test.php,就出现了这个问题。
修改一下php的配置文件httpd.conf。
在原有的位置文件中找到配置节:
 

复制代码 代码示例:
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>
 

修改成:
 

复制代码 代码示例:
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
#    Deny from all
    Allow from all
#允许所有访问
    Satisfy all
</Directory>

还有:
 

复制代码 代码示例:
<Directory "D:/Wamp5/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
    # //httpd.apache.org/docs/2.2/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:
    #   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
</Directory>
 

修改成:
 

复制代码 代码示例:
<Directory "D:/Wamp5/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
    # //httpd.apache.org/docs/2.2/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:
    #   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
</Directory>
 

然后保存,重启服务,再次访问时发现问题已解决了。

您可能感兴趣的文章:
nagios访问apache权限问题的解决方法
jQuery 开发者应该注意的9个错误
jQuery + Adobe Flash integration plugin
Input Placeholder
纯JAVASCRIPT图表动画插件Highcharts Examples
Mac-Style Drop Down Menu
Starting MySQL...The server quit without updating PID file的解决方法
php报错Permission denied的解决一法
jQuery模板技术和数据绑定实现代码
jQuery SOAP Client

关键词: php报错  php错误   
[关闭]
  • 如果浮躁,不妨读读铁路人坚守的故事 2018-12-11
  • 来看!十九大报告梳理哪家内容强 构思妙 2018-12-11
  • 大换血!勇士8人合同到期 若处理不好将影响霸主地位 2018-12-11
  • 美帝拉拢人民,才能反对共产党。 2018-12-10
  • 粽情粽意 传承文明———我们的节日2018端午节 2018-12-10
  • 都昌一代课教师无证上岗体罚学生? 县教体局称将辞退 2018-12-10
  • 四川乐山公开审理新型贩毒案 2018-12-09
  • 石泉男子独自养大两闺女 照料瘫痪老爸18年 2018-12-09
  • 星战外传再起——关于《游侠索罗》你应该知道的N件事 2018-12-08
  • 政坛当都大嘴巴战场啊?条条大路通大道! 2018-12-08
  • (原创)穿救生衣应成赛龙舟的标配 2018-12-08
  • 网友给四川省委书记、省长留言获回复 共计86条 2018-12-07
  • 建设工程质量管理条例 2018-12-07
  • “大地飞歌·2017”将于9月12日唱响 韩磊谭维维等加盟 2018-12-06
  • 三江源通天河流域发现两千年前岩画 2018-12-06
  • 636| 511| 666| 347| 741| 299| 666| 284| 683| 891|