apache problem You don don't have permission to access /test.php on this server solution-Alibaba Cloud Developer Community

keyword: Apache 403 Forbidden

system configuration:

operating system: Red Hat Linux 6.2

webserver:Apache 3.1.1+jakarta-tomcat 3.1.1

database server:oracle 8i

Apacheserver是目前应用最多的webserver,据统计在世界上的server中有超过一半采用Apacheserver.关于它的长处,您能够自己到http://www.apache.org/上去看。

今天我们的server出了一点儿问题:任何访问都会返回一个403的错误:

Forbidden

You don't have permission to access on this server.

It's not correct. It turned out to be good. I almost searched all the files in the system except for the problem of folder permissions and so on, in particular, all the configuration files under/etc/httpd/conf have been accessed. conf, Pyongyang. Add the conf file to httpd.conf file, at the same time in httpd. At the end of the conf file, add the following sentence:

Include /etc/httpd/conf/tomcat.conf to connect tomcat to apache.

After some thinking, I thought the problem must be in the httpd.conf file, so I checked the httpd.conf file again, and finally I found that there was such a paragraph:

AllowOverride AuthConfig FileInfo Indexs Limit OptionsOrder allow ,denyDeny from all ------------------- attention: this is it!! ---> remove this line or stare at it!!!

There was a burst of ecstasy in my heart. Haha, I remembered a sentence Zhao Benshan said, "Little Boy, I know you even if you take off your waistcoat", so I changed it:

Allow from all, restart the server, hey, it still doesn't work? My head began to grow bigger, and I thought to myself: I am here today. I have searched the httpd.conf file for more than n times and almost memorized it. I still can't find the problem. Strangely, it suddenly occurred to me that www.apache.org has a question database, and almost all the questions can be found on it, so I entered the http://bugs.apache.org/,查找keywordforbidden,果然就让我查到了,原来是我们一位同事想做一个虚拟主机,用了linux的配置工具linuxconf,这个工具因为版本号的问题,会导致httpd.conf文件的改动,事实上我仅仅要将上面的那一段去掉就能够万事大吉了 。

finally sum up experience: when you encounter something, you must first think of finding the answer on the site where the software is located, so as not to waste time.

The purpose of writing this article: Take me as the negative teaching material, don't always think that you can solve the problems, and don't consult on the professional site. Many sites have already had very good faq, which can basically meet people's daily needs. For example, pb is more for walking on www.sybase.com, java is going to http://developer.java.sun.com, vc goes to the bad children's house. In fact, some masters are not how smart they are, but they know how to find what they want from practical places.

I also found hope like him, but it didn't work. Later I was happy, but later I couldn't be happy again. Can't I wear it here? Who can help me? I! I! If not, save yourself.

resolve 403 Forbidden errors in Apache

text:

今天在公司电脑上安装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
发现了吧。因为配置了php后,这里的“Deny from all”已经拒绝了一切连接。把该行改成“allow from all”,改动后的代码例如以下,问题解决。
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
再次在浏览器里打开http://localhost,显示it works!
总结:如果你也发生了这样的403禁止访问,最好还是注意下apache的httpd.conf配置文件里有“Deny from all”这行的代码处,看看是不是哪里被系统悄悄地改动了。

this article is forwarded from the blog of Knowledge World in blog Park. Original link: apache problem You don don't have permission to access /test.php on this server solution. Please contact the original blogger by yourself.

Selected, One-Stop Store for Enterprise Applications
Support various scenarios to meet companies' needs at different stages of development

Start Building Today with a Free Trial to 50+ Products

Learn and experience the power of Alibaba Cloud.

Sign Up Now