Apache prompts you don't have permission to access/test. php on this server.

Source: Internet
Author: User
Tags apache 403 forbidden

Keyword: Apache 403 Forbidden

System Configuration:

Operating System: Red Hat Linux 6.2

Web server: Apache 3.1.1 + Jakarta-Tomcat 3.1.1

Database Server: Oracle 8i

Apache server is currently the most widely used Web server. According to statistics, more than half of the servers in the world use Apache server. You can go to http://www.apache.org/to check its advantages.

Today, our server has a problem: any access will return a 403 error:

Forbidden

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

No, it turned out to be fine. Besides the exclusion of directory permissions, I almost rummaged through all the files in the system, in particular, all the configuration files in/etc/httpd/conf are. conf, SRM. add the conf file to httpd. in the conf file, at the same time in httpd. at the end of the conf file, a sentence is added:

Include/etc/httpd/CONF/tomcat. conf to connect Tomcat and Apache.

After some thinking, I think the problem must be in the httpd. conf file, so I re-checked the httpd. conf file and finally found the following section:

<Files ~>
AllowOverride authconfig fileinfo indexs limit options
Order allow, deny
Deny from all ----------------- note: this is the case !! ---> Just remove or comment out this line !!!
</Files>

A burst of Ecstasy in my mind. Haha, I think of Zhao Benshan's saying, "Look, I recognize you when I'm out of my vest." So I changed it:

Allow from all, restart the server, restart, or not? My head started to grow bigger, and I thought: I 've loaded it here. After turning over n times, the httpd. conf file almost had to be backed up and the problem still could not be found. That's strange. I suddenly remembered that www.apache.org does not have a problem database. Almost all the questions can be answered above, so I went to the Workshop,In fact, all I need to do is remove the above section..

Conclusion: First, you need to find the answer on the website where the software is located, so as not to waste time.

The purpose of writing this article is to use me as the leading textbook. If you encounter problems, do not always think that you can solve them yourself, rather than consult on a professional website. Many websites have a very complete FAQ, basically can meet the needs of everyone at ordinary times, such as Pb to more to www.sybase.com walk, Java to http://developer.java.sun.com turn around, VC to the bad child's house. In fact, some experts do not know how smart they are, but how they can find what they want from useful places.

I also found hope like him, and it didn't work. Later I was happy, but later I was not happy. Why can't I do it here? Who can help me? I am looking for it! I am looking for it! If not, you can save yourself.

========================================================== ==============
========================================================== ==============
Solve 403BidDen Error

Zheng Wen:
Install Apache on the company's computer today, version 2.2.8. You can test it after installation. Configure PHP. in file again localhost open error: HTTP Error 403-Access prohibited, that is, 403 Forbidden: You don't have permission to access/on this server. insufficient permissions?

 

Open the configuration file httpd. conf of Apache and check it row by row. There is one of the following in about halfCode:

 

<Directory/>
Options followsymlinks
AllowOverride none
Order deny, allow
Deny from all
</Directory>

 

I found it. After PHP is configured, "Deny from all" has rejected all connections. Change this line to "allow from all". The modified code is as follows. The problem is solved.

 

<Directory/>
Options followsymlinks
AllowOverride none
Order deny, allow
Allow from all
</Directory>

 

Open http: // localhost in the browser again to display it works!

 

Conclusion: if such a 403 forbidden access occurs, consider Apache's httpd. the conf configuration file contains the code in the line "Deny from all" to see if the code has been quietly modified by the system.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.