PHP error: ForbiddenYoudon 'thavepermissiontoaccess/onthisserver.

Source: Internet
Author: User
Tags php error
PHP error: ForbiddenYoudon & #39; thavepermissiontoaccessonthisserver...

The message Forbidden You don't have permission to access/on this server is displayed during access by ip address.

Find a solution and record it here

 

The configuration file httpd. conf of php.

Find the configuration section in the original location file

     Options FollowSymLinks    AllowOverride None    Order deny,allow    Deny from all    Satisfy all

 

Modify

 Options FollowSymLinks AllowOverride None Order deny, allow # Deny from all Allow from all # allow all access to Satisfy all

 

 

And

 

 
      #    # Possible values for the Options directive are "None", "All",    # or any combination of:    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews    #    # Note that "MultiViews" must be named *explicitly* --- "Options All"    # doesn't give it to you.    #    # The Options directive is both complicated and important.  Please see    # http://httpd.apache.org/docs/2.2/mod/core.html#options    # for more information.    #    Options Indexes FollowSymLinks    #    # AllowOverride controls what directives may be placed in .htaccess files.    # It can be "All", "None", or any combination of the keywords:    #   Options FileInfo AuthConfig Limit    #    AllowOverride all    #    # Controls who can get stuff from this server.    ##   onlineoffline tag - don't remove    Order Deny,Allow    Deny from all    Allow from 127.0.0.1
 

 

Modify

 

 
      #    # Possible values for the Options directive are "None", "All",    # or any combination of:    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews    #    # Note that "MultiViews" must be named *explicitly* --- "Options All"    # doesn't give it to you.    #    # The Options directive is both complicated and important.  Please see    # http://httpd.apache.org/docs/2.2/mod/core.html#options    # for more information.    #    Options Indexes FollowSymLinks    #    # AllowOverride controls what directives may be placed in .htaccess files.    # It can be "All", "None", or any combination of the keywords:    #   Options FileInfo AuthConfig Limit    #    AllowOverride all    #    # Controls who can get stuff from this server.    ##   onlineoffline tag - don't remove    Order Deny,Allow#    Deny from all#  Allow from 127.0.0.1    Allow from all
 

 

Save and restart the service. The problem is solved during access.

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.