关键字: Apache 403 Forbidden
系统配置:
操作系统:Red Hat Linux 6.2
Web服务器:Apache 3.1.1+jakarta-tomcat 3.1.1
数据库服务器:oracle 8i
Apache服务器是目前应用最多的web服务器,据统计在世界上的服务器中有超过一半采用Apache服务器.关于它的好处,您可以自己到http://www.apache.org/上去看。
今天我们的服务器出了一点儿问题:任何访问都会返回一个403的错误:
Forbidden
You don't have permission to access on this server。
不对呀,原来还好好的,在排除了目录的权限等的问题外,我几乎翻遍了系统的所有文件,尤其是/etc/httpd/conf下的所有配置文件,因为我已经 将access.conf,srm.conf文件加入到httpd.conf文件中,同时在httpd.conf文件的最后加上了一句:
Include /etc/httpd/conf/tomcat.conf,以便将tomcat和apache连接起来。
在经过了一番思考之后,我认为问题肯定出在httpd.conf文件中,于是就又重新检查httpd.conf文件,终于让我发现了其中有这样一段:
<Files ~>
AllowOverride AuthConfig FileInfo Indexs Limit Options
Order allow ,deny
Deny from all-----------------注意:就是这儿!!--->把这行去掉或注释掉就行!!!
</Files>
心头一阵狂喜,哈哈,想起赵本山说的一句话“小样儿,脱了马甲我也认得你”,于是改成:
Allow from all,重新启动服务器,咦,还是不行?头开始大了,心想:今儿个我是载这儿了。又翻了n多遍httpd.conf文件几乎都要背下来了还找不到问题。也 怪,突然就想起来了,www.apache.org不是有个问题数据库吗,几乎所有的问题都可以在上面找到答案,于是进入 http://bugs.apache.org/,查找关键字forbidden,果然就让我查到了,原来是我们一位同事想做一个虚拟主机,用了 linux的配置工具linuxconf,这个工具因为版本的问题,会导致httpd.conf文件的修改,其实我只要将上面的那一段去掉就可以万事大吉了。
最终总结经验:遇到事情首先要想到到软件所在的网站上找答案,免得浪费时间。
写 此文的目的:以我为反面教材,遇到问题不要自己总是认为自己可以解决,而不到专业网站上请教。很多的网站已经有了非常完善的faq,基本上可以满足大家平 时的需求,比如pb的要多到www.sybase.com上走走,java到http://developer.java.sun.com上转转,vc到 坏孩子家溜溜。其实一些高手不是他们有多聪明,而是他们懂得如何从有用的地方找到自己想要的东西。
我也象他那样找到了希望,也没管用。后来我乐了,但后来我又乐不起来了。那着在我这里不行啊?谁能帮我?我找!我找!不行就自救。
===================================================
===================================================
解决Apache下403 Forbidden错误
正 文:
今 天在公司电脑上安装Apache,版本2.2.8,装完刚测试可以;配置了下php的php.in文件再次localhost打开发现错误:HTTP 错 误 403 - 禁止访问,即 403 Forbidden:You don't have permission to access / on this server.权限又不够 了?
马上打开apache的配置文件httpd.conf,逐行检查。在大约快一半的地方有以下这段代码:
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
发现了吧。由于配置了php后,这里的“Deny from all”已经拒绝了一切连接。把该行改成“allow from all”,修改后的代码如下,问题解决。
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>
再次在浏览器里打开http://localhost,显示it works!
总结:如果你也发生了这样的403禁止访问,不妨注意下apache的httpd.conf配置文件里有“Deny from all”这行的代码处,看看是不是哪里被系统悄悄地修改了。
相关推荐
Apache You don't have permission to access / on this server是一个在配置Apache时候,常常遇到的问题
主要介绍了apache You don't have permission to access /test.php on this server解决方法,需要的朋友可以参考下
键字: Apache 403 Forbidden 系统配置: 操作系统:Red Hat Linux 6.2 Web服务器:Apache 3.1.1+jakarta-tomcat 3.1.1 数据库服务器:oracle 8i Apache服务器是目前应用... You don’t have permission to access
运行php时提示You don't have permission to access /index.php on.错误的解决方法,需要的朋友可以参考下
主要介绍了WampServer设置apache伪静态出现404 not found及You don't have permission to access / on this server解决方法,较为详细的分析了几种常见情况,非常具有实用价值,需要的朋友可以参考下
本文实例讲述了WampServer设置apache伪静态出现404 not found及You don’t have permission to access / on this server解决方法。分享给大家供大家参考。具体如下: 出现404 not found 时: 确保LoadModule rewrite_...
问题描述: 在使用git 进行提交时, 出现上面这个报错, 导致无法提交. 报错大致意思就是创建index.lock文件失败,因为已经存在index.lock文件了. index.lock文件是在.git下面, 而.git是一般是隐藏的, 那么可以通过以下...
易网主机ShopexEcshop报错Can't createwrite to file解决方案
Permission to use, copy, modify and distribute the SVG DTD and its accompanying documentation for any purpose and without fee is hereby granted in perpetuity, provided that the above copyright ...
Forbidden You don't have permission to access / on this server.
本地搭建wamp,输入http://127.0.0.1访问正常,当输入http://localhost/,apache出现You don't have permission to access/on this server.的提示,如何解决? 解决方法:...
You don't have permission to access / on this server. 更改D:\Installsoftware\apache\apache\httpd-2.2-x64\conf文件夹中的httpd.conf文件中 <Directory /> Options FollowSymLinks AllowOverride None ...
Permission is granted for an individual or institution to use this software provided that: 1) The software is not sold in any way. 2) The software is not redistributed beyond your immediate ...
Vue的权限管理Premission,单个文件,里面详细介绍了该页面的路由跳转,以及Token指令退出,登出,配置白名单等相应操作,逻辑简单。可以下载浏览
Apache: The Anatomy of a Web Server.........................................................1 The Apache Source ...........................................................................................
// permission to link this library with independent modules to produce an // executable, regardless of the license terms of these independent // modules, and to copy and distribute the resulting ...
Launches the App Ops feature that is hidden in Android 4.3 to 4.4.1 You can download the app at https://play.google.com/store/apps/details?id=co.uk.thewirelessguy.appops Author Stephen Mullen Stephen ...
Please reference the [test codes](./android/test/ndcam/). ```console $ gradle connectedAndroidTest # Run test ``` ### Use The following code shows working with `SurfaceView` class. ```java package...
You don’t need to ask permission to use any of the visuals but it will be nice if you can provide credit to the designer/author (author information found in the slide notes). Check out the versions ...
凤凰新闻文本第二部分 欢迎大家光临我的博客:http://hi.baidu.com/finallyliuyu 如您在语料库的使用中遇到什么问题,可从以上博客联系我