apache 问题 You don't have permission to access /test.php on this server 解决方法
来源:互联网 发布:1688一键传淘宝教程 编辑:程序博客网 时间:2024/06/06 12:24
关键字: Apache
系统配置:
操作系统:Red Hat Linux 6.2
Web服务器:Apache 3.1.1+jakarta-tomcat 3.1.1
数据库服务器:oracle 8i
Include /etc/httpd/conf/tomcat.conf,以便将tomcat和apache连接起来。
在经过了一番思考之后,我认为问题肯定出在httpd.conf文件中,于是就又重新检查httpd.conf文件,终于让我发现了其中有这样一段:
AllowOverride AuthConfig FileInfo Indexs Limit Options
Order allow ,deny
Deny fromall-----------------注意:就是这儿!!--->把这行去掉或注释掉就行!!!
心头一阵狂喜,哈哈,想起赵本山说的一句话“小样儿,脱了马甲我也认得你”,于是改成:
Allow fromall,重新启动服务器,咦,还是不行?头开始大了,心想:今儿个我是载这儿了。又翻了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错误
正 文:
今天在测试一个php程序的时候,发现这个问题:
Forbidden
You don't have permission to access / on this server.
开始的时候我是用http://localhost/test.php进行的测试,没有发现问题,后来要在内网测试一下就要用IP地址进行那个访问了,如:http://10.10.50.195/test.php,就出现了这个问题。
后来咨询了一下朋友(php高手),说修改一下php的配置文件httpd.conf。
在原有的位置文件中找到配置节
修改成
#
#允许所有访问
还有
#
修改成
#
#
#
然后保存,重启服务,在访问就解决了这个问题。
此 时已经可以访问你的服务器,不出意外的话,能够看到 “Apache 2 Test Page powered byCentOS” 的测试页面。注意,如果其他机器访问这台服务无法显示这个页面,而直接在这台服务器上可以访问的话,一般情况下是CentOS 自带的防火墙禁止了。你只需要进入防火墙,将 “WWW” 对应的 “80” 端口打开即可。
注意:在 CentOS 中 Apache 的默认根目录是 /var/www/html,配置文件/etc/httpd/conf/httpd.conf。其他配置存储在 /etc/httpd/conf.d/ 目录
如果打开网站出现 apache 403 forbidden 错误的话 原因是用了ROOT装的APACHE会出权限问题
给最高权限chmod -R 777 /var/home/userid/cc 也可以处理。
或者 使用方法:chown -R username:groupname directoryname意思为把这个目录下的所有文件和文件夹更改拥有者
- apache 问题 You don't have permission to access /test.php on this server 解决方法
- apache You don't have permission to access /test.php on this server解决方法
- apache You don't have permission to access /test.php on this server解决方法
- apache 提示You don't have permission to access /test.php on this server
- apache 提示You don't have permission to access /test.php on this server.怎样解决
- apache 提示You don't have permission to access /test.php on this server.怎样解决
- apache 提示You don't have permission to access /test.php on this server.怎样解决
- apache 提示You don't have permission to access /test.php on this server.怎样解决
- apache报错You don't have permission to access /test/index.php on this server.
- apache 提示You don't have permission to access /test.php on this server.怎样解决
- apache 提示You don't have permission to access /test.php on this server.
- apache 提示You don't have permission to access /test.php on this server.解决
- apache 提示You don\'t have permission to access /test.php on this server.怎样解决
- You don\'t have permission to access /test.php on this server.怎样解决Forbidden
- apache 之 you don't have permission to access / on this server linux 下 错误解决方法
- apache 之 you don't have permission to access / on this server linux 下 错误解决方法
- apache 之 you don't have permission to access / on this server linux 下 错误解决方法
- centos7 apache 虚拟目录 You don't have permission to access / on this server 解决方法
- TableView的相关设置
- UVALive 7261 A - Xiongnu's Land
- 按钮简单选择器
- 如何让div中的文字居中
- java --内存溢出的问题
- apache 问题 You don't have permission to access /test.php on this server 解决方法
- 代码审计的艺术系列—第二篇
- 对linux下mv、chmod命令基本功能的实现
- POJ 2653 Pick-up sticks [线段相交]【计算几何】
- Java的基础知识1
- 第一次的给codeforce
- android一个LinearLayout中具有几个控件,想要使那几个控件在LinearLayout被点击时,有颜色变化
- Android通过请求网络数据实现ListView,ListView的优化、图片的缓存、子控件的点击事件。
- httpd: Could not reliably determine the server's fully qualified domain name