Summary of "HTTP exception 403-Forbidden" workaround appears in PHP

Source: Internet
Author: User
Tags 403 forbidden error
Summary of "HTTP Error 403-Forbidden" workaround appears in PHP

Installs Apache, version 2.2.6, installs just test can; config the next php php.in file again localhost open found error: HTTP Error 403-Forbidden, that is 403 forbidden:you don ' t have permission To access/on the this server. Not enough permissions?

Open the Apache configuration file httpd.conf, and check it line by row. In about half of the time, there is the following code:

???? Options FollowSymLinks

???? AllowOverride None

???? Order Deny,allow

???? Deny from all

Found it. Since PHP was configured, the "Deny from all" here has rejected all connections. Change the line to "allow from all", modify the code as follows, solve the problem

???? Options FollowSymLinks

???? AllowOverride None

???? Order Deny,allow

???? Allow from all

Open http://localhost again in the browser, show it works!????

Summary: If you also have such a 403 forbidden access, you may wish to note that the Apache httpd.conf configuration file has the "Deny from all" line of code, to see if the system has been quietly modified

?

?

You do not have permission to view this page
You may not have permission to view this directory or Web page with the credentials you provide
If you are sure you can view the directory or webpage, try contacting the website using the email address or phone listed on the localhost home page.
You can click Search to find information on the Internet.

HTTP Error 403-Access Forbidden
Internet Explorer
There are several ways to solve these problems:
1. ??
?????????? Options?? FollowSymLinks??
?????????? AllowOverride?? None??
?????????? Order?? Deny,allow??
?????? #???? Deny?? From?? All??
?????????? Satisfy?? All??
??
2. Find DocumentRoot "D:/www" in the httpd.conf file is the path to your PHP file, with a line underneath it
, let the two of these places be the same.

?

?

Win7 Apache 403 error

Apache after configuring the virtual directory, access to the site prompt no permission, engaged for a few hours, finally found the cause of the error, the original is my Apache configuration file reasons,

My Apache config file has a sentence alias/mycode "d:/mycode/"

This is the setting of the virtual directory

I changed it to Alias/mycode "D:/mycode" everything OK

The following is the correct wording

Alias/server1? /var/server1? correct

Alias/server1/? /var/server1/? correct

alias/server1/?/var/server1??// Error

?

Apache HTTP 403 Forbidden Error resolution

?

?

In the configuration of the Apache Linux service, often encounter http403 error, I today configuration test also appeared, finally resolved, summed up a bit. HTTP 403 error is a denial of access meaning, for a number of reasons. I have summed up the main 4 kinds of reasons!

1. Access to the document permissions is insufficient. More than 755 permissions. Workaround: Use the command chmod 755/var/www/or other appropriate directory.

2. Reasons for SELinux or firewalls. Workaround: First turn off SELinux and let the firewall pass the WWW service.

3. Virtual Host configuration error. WORKAROUND: Reconfigure the virtual host or temporarily shut down.

4. Alias instruction configuration error. (Alias syntax: alias?< var style= "font-style:italic;" >url-path ? file-path | directory-path )

?? The workaround is as follows:? Open the Apache configuration file httpd.conf, view all the alias instructions, if the command Url-path the end contains/, then file- Path or dir- Path the end of the is also required to include/, as follows:

Alias/server1? /var/server1? correct

Alias/server1/? /var/server1/? correct

alias/server1/?/var/server1??// Error

5. Settings for DocumentRoot. Here's how to fix it:

Open the Apache configuration file httpd.conf and find this code:


Options FollowSymLinks
AllowOverride None
Order Deny,allow
Deny from all

Sometimes because PHP is configured, the "Deny from all" here has rejected all connections. Change the line to "allow from all" and modify the code as follows to resolve the problem.


Options FollowSymLinks
AllowOverride None
Order Deny,allow
Allow from all

?

Delete the thinkphp compiled runtime folder.

  • 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.