apache You don't have permission access and test.php on this server solution

  • 2020-05-13 04:07:58
  • OfStack

Key: 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 the most used web server, according to the statistics in the world for more than 1 and a half used in server Apache server. About the benefits of it, you can own to http: / / www apache. org/look.

Today we had a problem with our server: any access will return a 403 error:


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

Wrong ah, the original is fine, in out of the problem such as the directory permissions, I nearly went through all the files of the system, especially/etc/httpd/conf under all configuration files, because I have access. conf, srm. conf file to join httpd. conf file, at the same time in httpd. conf file last plus 1 sentence:

Include/etc/httpd/conf/tomcat conf, in order to connect tomcat and apache.

After thinking it over for a while, I decided that the problem must be in the httpd.conf file, so I re-examined the httpd.conf file and finally found the following paragraph:


<Files ~>
AllowOverride AuthConfig FileInfo Indexs Limit Options
Order allow ,deny
Deny from all----------------- Note: this is it !!---> Just get rid of this line or comment it out!!
</Files>

Heart 1 in ecstasy, ha ha, think of zhao benshan said a sentence "small sample, off the vest I also know you", so changed to:

Allow from all, restart the server, huh? The head began to be big, thought: today son I is drive here. I have to memorize the httpd files and I still can't find the problem. Also strange, suddenly remembered, www. apache. org any database is not a problem, almost all problems can be found in the above answer, then enter the http: / / bugs apache. org /, search keyword forbidden, really let me check in, is our one colleague to do a virtual host, with linux linuxconf configuration tool, this tool because the version of the problem, can lead to httpd. conf file modifications, I'm just going to get rid of the top one and everything will be fine.

The final summary of experience: the first thing to think of the software site to find the answer, so as not to waste time.

The purpose of writing this article: with me as the negative example, encounter a problem don't always think oneself can solve, and not to seek advice on the professional website. Many websites have very complete faq, basically can meet the needs of everyone at ordinary times, such as more pb to www. sybase. Walk on com, java http: / / developer java. sun. com around, vc to bad living walk. In fact, some masters are not how smart they are, but they know how to find what they want from useful places.

I found hope as he did, and it didn't work. Then I laughed, but then I couldn't. That doesn't work for me, does it? Who can help me? I looking for! I looking for! Save yourself if you can't.

===================================================
===================================================
The 403 Forbidden error was resolved under Apache

Is:

Today, I installed Apache, version 2.2.8, on the company's computer, and it is ok to finish the test. jakarta php. in file configured with php again localhost open and find error: HTTP error 403 - access disabled, i.e. 403 Forbidden: You don t to access access on access server

Open the httpd.conf configuration file for apache immediately and check it line by line. About a half way faster there is the following code:


<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

See. Since php is configured, "Deny from all" here has rejected a 1-cut connection. Change the line to "allow from all", the modified code is as follows, problem solved.


<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    allow from all
</Directory>

Open http://localhost in your browser again, it works!

Summary: if you have this 403 shutdown, take note of the "Deny from all" line in the apache httpd.conf configuration file and see if anything has been quietly changed.


Related articles: